//
//  KVNGroupbuyDetailViewController.m
//  Test1
//
//  Created by KelvinYeung on 15/8/6.
//  Copyright (c) 2015年 KelvinYeung. All rights reserved.
//

#import "KVNGroupbuyDetailViewController.h"
#import "KVNSlideView.h"
#import "KVNHouseGraphicsCollectionViewCell.h"
#define ANIMATION_DURATION 0.25





@interface KVNGroupbuyDetailViewController ()


@property UIButton *myBackButton;
@property UIActivityIndicatorView* activityIndicatorView ;
@property UIScrollView *mainView;
@property UIView *bannerView;
@property UICollectionView *bannerCollectionView;
@property NSDictionary *mediaSet;
@property UILabel *bannerMediaAmtLabel;
@property UILabel * bannerPagingControl;
@property int bannerMediaAmt;
@property int bannerMediaCurrentPage;
//楼盘参数-------
@property UIView *housePropertiesView;
@property BOOL ishousePropertiesViewExplanded;
@property UIImageView *housePropertiesDropDownBarArrow;

@property UILabel *housePropertiesOpenDateValue;
@property UILabel *housePropertiesPlanIndustValue;
@property UILabel *housePropertiesBuildTypeValue;
@property UILabel *housePropertiesPlanTypeValue;
@property UILabel *housePropertiesBuildAreaValue;
@property UILabel *housePropertiesShareRatioValue;
@property UILabel *housePropertiesPlotRatioValue;
@property UILabel *housePropertiesGreenRatioValue;
@property UILabel *housePropertiesParkingPlaceAmountValue1;
@property UILabel *housePropertiesParkingPlaceAmountValue2;
@property UILabel *housePropertiesBuildingAmountValue;
@property UILabel *housePropertiesDevelaperValue;
@property UILabel *housePropertiesManagementCompanyValue;
@property UILabel *housePropertiesYearOfPropertyRightValue;
@property UILabel *housePropertiesStartDateValue;
@property UILabel *housePropertiesEndDateValue;




//项目简介
@property UIView *projectIntroView;
@property UIImageView *projectIntroDropDownBarArrow;
@property BOOL isProjectIntroViewExplanded;
@property UIView * projectIntroContentView;
@property NSLayoutConstraint *projectIntroViewHeightConstraint1;
@property NSLayoutConstraint *projectIntroViewHeightConstraint2;
@property UILabel * projectIntroContentTextView1;
@property UILabel * projectIntroContentTextView2;
//房价走势
@property UIView *priceTendencyView ;
@property KVNLineChartsView * priceLineChart;
@property NSDictionary * priceTrendencyData;
@property UISegmentedControl *priceTendencySegmentedControl;

//摘要
@property UIView *summaryView;
@property UILabel *priceValueLabel;
@property UILabel *openDateValueLabel;
@property UILabel *addressValueLabel;

//商多多特惠
@property UIView *promotionView ;
@property UILabel * saleCntValueLabel;//可售
@property UILabel *promotionApplyAmountValue;//已报名
@property UILabel *promotionContentDetail;//详情
@property UILabel *promotionEndTime;//截止日期
//看房团护名
@property UIView * scenesTourView;

//户型图
@property UILabel *houseModelGraphicViewTitleBarText;
@property UIView *houseModelGraphicView;
@property UICollectionView *modelGraphicsCollectionView;
@property NSArray* modelList;

//地图找房
@property UIView *findHouseInMapView;
@property UILabel *findHouseInMapAddressValue;
@property UIImageView * findHouseInMapStaticImageView;
//动态
@property UIView *dynamicView;
@property UILabel *dynamicViewTitleBarText;
@property UILabel *dynamicContentTitle;
@property UILabel *dynamicContentDate;
//在线评房
@property UIView *commentView;
@property KVNCommentStarView *commentTableHeaderStarView;
@property UILabel *commentTableHeaderViewTotalScoreLabel;
@property UILabel *commentTableHeaderViewDetailScoreLabel;
@property NSArray *commentList;
@property UITableView *commentTableView;
//置业顾问
@property UIView *consultantView;
@property NSArray * consultantList;
@property UITableView *consultantTableView;
@property NSLayoutConstraint *consultantViewConstraintHeight;
//周边项目
@property UILabel *surroundProjectTitleBarText;
@property UIView *surroundProjectView;
@property NSArray * surroundingsList;
@property UICollectionView *surroundProjectCollectionView;

//同类项目
@property UILabel *similarProjectTitleBarText;
@property UIView *similarProjectView;
@property NSArray * similarsList;
@property UICollectionView *similarProjectCollectionView ;



@end

@implementation KVNGroupbuyDetailViewController
@synthesize myBackButton;
@synthesize bannerCollectionView;
@synthesize bannerMediaAmtLabel;
@synthesize bannerPagingControl;
@synthesize housePropertiesView;
@synthesize housePropertiesDropDownBarArrow;
@synthesize projectIntroView;
@synthesize projectIntroContentView;
@synthesize projectIntroDropDownBarArrow;
@synthesize priceLineChart;

//摘要
@synthesize summaryView;
@synthesize priceValueLabel;
@synthesize openDateValueLabel;
@synthesize addressValueLabel;

//商多多特惠
@synthesize promotionView ;
@synthesize saleCntValueLabel;//可售
@synthesize promotionApplyAmountValue;//已报名
@synthesize promotionContentDetail;//详情
@synthesize promotionEndTime;//截止日期
//看房团报名
@synthesize scenesTourView;

//楼盘参数
@synthesize housePropertiesOpenDateValue;
@synthesize housePropertiesPlanIndustValue;
@synthesize housePropertiesBuildTypeValue;
@synthesize housePropertiesPlanTypeValue;
@synthesize housePropertiesBuildAreaValue;
@synthesize housePropertiesShareRatioValue;
@synthesize housePropertiesPlotRatioValue;
@synthesize housePropertiesGreenRatioValue;
@synthesize housePropertiesParkingPlaceAmountValue1;
@synthesize housePropertiesParkingPlaceAmountValue2;
@synthesize housePropertiesBuildingAmountValue;
@synthesize housePropertiesDevelaperValue;
@synthesize housePropertiesManagementCompanyValue;
@synthesize housePropertiesYearOfPropertyRightValue;
@synthesize housePropertiesStartDateValue;
@synthesize housePropertiesEndDateValue;
//户型图
@synthesize houseModelGraphicViewTitleBarText;
@synthesize houseModelGraphicView;
@synthesize modelGraphicsCollectionView;
//地图找房
@synthesize findHouseInMapView;
@synthesize findHouseInMapAddressValue;
@synthesize findHouseInMapStaticImageView;

//动态
@synthesize dynamicView;
@synthesize dynamicViewTitleBarText;
@synthesize dynamicContentTitle;
@synthesize dynamicContentDate;
//项目简介
@synthesize projectIntroContentTextView1;
@synthesize projectIntroContentTextView2;

//在线评房
@synthesize commentView;
@synthesize commentTableHeaderStarView;
@synthesize commentTableHeaderViewTotalScoreLabel;
@synthesize commentTableHeaderViewDetailScoreLabel;
@synthesize commentTableView;
//房价走势
@synthesize priceTendencyView ;
@synthesize priceTendencySegmentedControl;
//置业顾问
@synthesize consultantView ;
@synthesize consultantTableView;
//周边项目
@synthesize surroundProjectTitleBarText;
@synthesize surroundProjectView;
@synthesize surroundProjectCollectionView;
//同类项目
@synthesize similarProjectTitleBarText;
@synthesize similarProjectView;
@synthesize similarProjectCollectionView;


- (void)viewDidLoad {
    [super viewDidLoad];

    
    CGRect appFrame =[[UIScreen mainScreen] applicationFrame];

    //标题
    [self initNavigationItem];

    

    //主视图

    
    //定义一个scrollView
    _mainView = [[UIScrollView alloc] init];
    _mainView.delegate = self;
    _mainView.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1];
    _mainView.autoresizesSubviews = YES;
    _mainView.showsVerticalScrollIndicator = NO;
    //self.automaticallyAdjustsScrollViewInsets = YES;
    _mainView.alwaysBounceVertical = YES;
    _mainView.alwaysBounceHorizontal = NO;
    
    self.view = _mainView;
    
    //设置scrollView不留白
    //self.automaticallyAdjustsScrollViewInsets = NO;
    //主图
    //Banner轮播图
    //_bannerView = [[KVNSlideView alloc]initWithFrame:CGRectMake(0, 0, appFrame.size.width, 200)];
    //KVNSlideViewItem *slideItem1 = [[KVNSlideViewItem alloc]init];
    //slideItem1.image = [UIImage imageNamed:@"banner1.jpg"];
    //KVNSlideViewItem *slideItem2 = [[KVNSlideViewItem alloc]init];
    //slideItem2.image = [UIImage imageNamed:@"banner2.jpg"];
    //NSArray *bannerArray = @[slideItem1,slideItem2];
    //[_bannerView setViews:bannerArray];
    //_bannerView.slideViewItemClick = ^(KVNSlideViewItem *slideViewItem){
    //    NSLog(@"KVNHomeViewController ScrollView is Click..");
    //};
    //[self.view addSubview:_bannerView];
    
    
    _bannerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, appFrame.size.width, KVN_CONTENT_BOX_HEIGHT_BANNER)];
    _bannerView.backgroundColor =[UIColor yellowColor];
    [self.view addSubview:_bannerView];
    
    UICollectionViewFlowLayout *bannerViewCollectionLayout = [[UICollectionViewFlowLayout alloc] init];
    
    //单元格大小
    bannerViewCollectionLayout.itemSize =CGSizeMake(_bannerView.frame.size.width, _bannerView.frame.size.height);
    
    //行间距
    bannerViewCollectionLayout.minimumLineSpacing = 0;
    
    
    //列间距
    bannerViewCollectionLayout.minimumInteritemSpacing =0;
    [bannerViewCollectionLayout setSectionInset:UIEdgeInsetsMake(0, 0, 0, 0)];
    [bannerViewCollectionLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
    
    bannerCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) collectionViewLayout:bannerViewCollectionLayout];
    bannerCollectionView.tag = KVN_COLLECTION_VIEW_BANNER_VIEW;
    bannerCollectionView.alwaysBounceHorizontal = YES;
    bannerCollectionView.showsHorizontalScrollIndicator = NO;
    bannerCollectionView.delegate = self;
    bannerCollectionView.dataSource = self;
    // [hotCityCollectionView setScrollEnabled:YES];
    bannerCollectionView.backgroundColor = [UIColor whiteColor];
    //注册cell
    [bannerCollectionView registerClass:[KVNBannerCollectionViewCell class] forCellWithReuseIdentifier:@"KVN_BANNER_MEDIA_CELL"];
    [_bannerView addSubview:bannerCollectionView];
    bannerCollectionView.pagingEnabled = YES;
    
    bannerCollectionView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerCollectionView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerCollectionView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerCollectionView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerCollectionView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];

    
    //视频Icon
    UIButton *bannerVideoIcon = [UIButton buttonWithType:UIButtonTypeSystem];
    [_bannerView addSubview:bannerVideoIcon];
    [bannerVideoIcon setImage:[UIImage imageNamed:@"index_icon_video_gray"] forState:UIControlStateNormal];
    [bannerVideoIcon setTintColor:[UIColor grayColor]];
    bannerVideoIcon.translatesAutoresizingMaskIntoConstraints = NO;
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerVideoIcon attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerVideoIcon attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeBottom multiplier:1 constant:-15]];
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerVideoIcon attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:32]];
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerVideoIcon attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:13]];
    
    //共多少张图片
    UIView *bannerMediaAmtView = [[UIView alloc] init];
    bannerMediaAmtView.layer.cornerRadius = 3;
    bannerMediaAmtView.backgroundColor = [UIColor colorWithWhite:0.2 alpha:0.7];
    [_bannerView addSubview:bannerMediaAmtView];
    UIImageView  *bannerMediaAmtIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pic_icon"]];
    [bannerMediaAmtView addSubview:bannerMediaAmtIcon];
    bannerMediaAmtLabel = [[UILabel alloc]init];
    bannerMediaAmtLabel.text = @"共0张";
    bannerMediaAmtLabel.textColor = [UIColor whiteColor];
    bannerMediaAmtLabel.font = [UIFont systemFontOfSize:12];
    [bannerMediaAmtView addSubview:bannerMediaAmtLabel];
    bannerMediaAmtView.translatesAutoresizingMaskIntoConstraints = NO;
    bannerMediaAmtIcon.translatesAutoresizingMaskIntoConstraints = NO;
    bannerMediaAmtLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeBottom multiplier:1 constant:-12]];
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeRight multiplier:1 constant:-10]];
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:20]];
    //[_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:100]];

    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtIcon attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:bannerMediaAmtView attribute:NSLayoutAttributeRight multiplier:1 constant:-5]];
    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtIcon attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:bannerMediaAmtView attribute:NSLayoutAttributeTop multiplier:1 constant:3]];
    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtIcon attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:14]];
    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtIcon attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:14]];
    
    
    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:bannerMediaAmtView attribute:NSLayoutAttributeTop multiplier:1 constant:3]];
    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:bannerMediaAmtIcon attribute:NSLayoutAttributeLeft multiplier:1 constant:-5]];
    [bannerMediaAmtView addConstraint:[NSLayoutConstraint constraintWithItem:bannerMediaAmtLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem: bannerMediaAmtView attribute:NSLayoutAttributeLeft multiplier:1 constant:5]];
    
    //分页指示 样式：1/16
    bannerPagingControl = [[UILabel alloc] init];
    bannerPagingControl.text = @"0/0";
    bannerPagingControl.textColor = [UIColor whiteColor];
    bannerPagingControl.font = [UIFont systemFontOfSize:12];
    [_bannerView addSubview:bannerPagingControl];
    bannerPagingControl.translatesAutoresizingMaskIntoConstraints = NO;
    
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerPagingControl attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeBottom multiplier:1 constant:-15]];
    [_bannerView addConstraint:[NSLayoutConstraint constraintWithItem:bannerPagingControl attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
    
    
    
    //Summary---------------------------------------------------------------------------------
    summaryView = [[UIView alloc] init];
    summaryView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:summaryView];
    summaryView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:summaryView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:summaryView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:summaryView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:_bannerView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:summaryView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_SUMMARY]];
    
    //参考价
    UILabel *priceLabel = [[UILabel alloc] init];
    [summaryView addSubview:priceLabel];
    priceLabel.text = @"参考价:";
    priceLabel.textColor = [UIColor redColor];
    priceLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    [summaryView addConstraint: [NSLayoutConstraint constraintWithItem:priceLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:priceLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];

    

    priceValueLabel = [[UILabel alloc] init];
    [summaryView addSubview:priceValueLabel];
    priceValueLabel.text = @"待定";
    priceValueLabel.textColor = [UIColor redColor];
    priceValueLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    [summaryView addConstraint: [NSLayoutConstraint constraintWithItem:priceValueLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:priceValueLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:priceLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    UIButton *calculatorButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [summaryView addSubview:calculatorButton];
    [calculatorButton setImage:[UIImage imageNamed:@"calc_pure_icon"] forState:UIControlStateNormal];
    [calculatorButton setTintColor:[UIColor redColor]];
    [calculatorButton setClipsToBounds:YES];
    [calculatorButton addTarget:self action:@selector(defaultAction:) forControlEvents:UIControlEventTouchUpInside];
    calculatorButton.translatesAutoresizingMaskIntoConstraints = NO;
    
    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:calculatorButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:priceValueLabel attribute:NSLayoutAttributeRight multiplier:1 constant:5]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:calculatorButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:priceValueLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:calculatorButton attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:18]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:calculatorButton attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:14]];
    
    
    
    
    
    //开盘时间
    UILabel *openDateLabel = [[UILabel alloc] init];
    [summaryView addSubview:openDateLabel];
    openDateLabel.text = @"开盘时间:";
    openDateLabel.font = [UIFont systemFontOfSize:14];
    openDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:openDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:priceLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:openDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    openDateValueLabel = [[UILabel alloc] init];
    [summaryView addSubview:openDateValueLabel];
    openDateValueLabel.text = @"暂无";
    openDateValueLabel.textColor = [UIColor grayColor];
    openDateValueLabel.font = [UIFont systemFontOfSize:14];
    openDateValueLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:openDateValueLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:openDateLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:openDateValueLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:openDateLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    

    
    
    //地址
    UILabel *addressLabel = [[UILabel alloc] init];
    [summaryView addSubview:addressLabel];
    addressLabel.text = @"地址:";
    addressLabel.font = [UIFont systemFontOfSize:14];
    addressLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:addressLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:openDateLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:addressLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    
    addressValueLabel = [[UILabel alloc] init];
    [summaryView addSubview:addressValueLabel];
    addressValueLabel.text = @"暂无";
    addressValueLabel.textColor = [UIColor grayColor];
    addressValueLabel.font = [UIFont systemFontOfSize:14];
    addressValueLabel.translatesAutoresizingMaskIntoConstraints = NO;

    
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:addressValueLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:addressLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [summaryView addConstraint:[NSLayoutConstraint constraintWithItem:addressValueLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:addressLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];

    
    
    //商多多优惠--------------------------------------------------
    promotionView = [[UIView alloc]init];
    [self.view addSubview:promotionView];
    promotionView.backgroundColor = [UIColor whiteColor];
    promotionView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    promotionView.layer.borderWidth = 0.5;
    
    promotionView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:promotionView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:promotionView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:promotionView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:summaryView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:promotionView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_PROMOTION]];
    
    //图标
    UIImageView * promotionIcon  = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"promotionIcon"]];
    [promotionView addSubview:promotionIcon];
    promotionIcon.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionIcon attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionIcon attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionIcon attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:20]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionIcon attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:20]];
    
    
   
    
    
    //标题
    UILabel * promotionTitleLabel = [[UILabel alloc]init];
    [promotionView addSubview:promotionTitleLabel];
    promotionTitleLabel.text = @"商多多特惠";
    promotionTitleLabel.textColor = [UIColor orangeColor];
    promotionTitleLabel.translatesAutoresizingMaskIntoConstraints = NO;
    

    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionTitleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionIcon attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionTitleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionIcon attribute:NSLayoutAttributeRight multiplier:1 constant:5]];
    
    //可售
    UILabel * saleCntLabel = [[UILabel alloc]init];
    [promotionView addSubview:saleCntLabel];
    saleCntLabel.text = @"可售:";
    saleCntLabel.textColor = [UIColor grayColor];
    saleCntLabel.font = [UIFont systemFontOfSize:14];
    saleCntLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:saleCntLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionIcon attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:saleCntLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    saleCntValueLabel = [[UILabel alloc]init];
    [promotionView addSubview:saleCntValueLabel];
    saleCntValueLabel.text = @"0套";
    saleCntValueLabel.textColor = [UIColor grayColor];
    saleCntValueLabel.font = [UIFont boldSystemFontOfSize:14];
    
    saleCntValueLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:saleCntValueLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:saleCntLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:saleCntValueLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:saleCntLabel attribute:NSLayoutAttributeRight multiplier:1 constant:5]];
    
    
    //已报名
    UILabel *promotionApplyAmount = [[UILabel alloc] init];
    [promotionView addSubview:promotionApplyAmount];
    promotionApplyAmount.text = @"已报名:";
    promotionApplyAmount.textColor = [UIColor grayColor];
    promotionApplyAmount.font = [UIFont systemFontOfSize:14];
    promotionApplyAmount.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionApplyAmount attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:saleCntLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionApplyAmount attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:saleCntValueLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    promotionApplyAmountValue = [[UILabel alloc] init];
    [promotionView addSubview:promotionApplyAmountValue];
    promotionApplyAmountValue.text = @"0人";
    promotionApplyAmountValue.textColor = [UIColor grayColor];
    promotionApplyAmountValue.font = [UIFont systemFontOfSize:14];
    promotionApplyAmountValue.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionApplyAmountValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionApplyAmount attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionApplyAmountValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionApplyAmount attribute:NSLayoutAttributeRight multiplier:1 constant:5]];
    
    
    //商多多专享
    UILabel *promotionContentTitle = [[UILabel alloc] init];
    [promotionView addSubview:promotionContentTitle];
    promotionContentTitle.text = @"商多多专享:";
    promotionContentTitle.textColor = [UIColor grayColor];
    promotionContentTitle.font = [UIFont systemFontOfSize:14];
    promotionContentTitle.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionContentTitle attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:saleCntLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionContentTitle attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:saleCntLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionContentTitle attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:75]];
    
    promotionContentDetail = [[UILabel alloc] init];
    [promotionView addSubview:promotionContentDetail];
    promotionContentDetail.text = @"";
    promotionContentDetail.textColor = [UIColor grayColor];
    promotionContentDetail.font = [UIFont systemFontOfSize:14];
    promotionContentDetail.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionContentDetail attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionContentTitle attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionContentDetail attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionContentTitle attribute:NSLayoutAttributeRight multiplier:1 constant:5]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionContentDetail attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeRight multiplier:1 constant:-70]];
    
    //截止日期
    
    UILabel *promotionEndTimeTitle = [[UILabel alloc] init];
    [promotionView addSubview:promotionEndTimeTitle];
    promotionEndTimeTitle.text = @"截止日期";
    promotionEndTimeTitle.textColor = [UIColor grayColor];
    promotionEndTimeTitle.textAlignment = UITextAlignmentLeft;
    promotionEndTimeTitle.font = [UIFont systemFontOfSize:14];
    promotionEndTimeTitle.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionEndTimeTitle attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionContentTitle attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionEndTimeTitle attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionContentTitle attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    
    
    
    promotionEndTime = [[UILabel alloc] init];
    [promotionView addSubview:promotionEndTime];
    promotionEndTime.text = @"";
    promotionEndTime.textColor = [UIColor grayColor];
    promotionEndTime.font = [UIFont systemFontOfSize:14];
    promotionEndTime.translatesAutoresizingMaskIntoConstraints = NO;
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionEndTime attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionEndTimeTitle attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionEndTime attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionEndTimeTitle attribute:NSLayoutAttributeRight multiplier:1 constant:5]];
    
    
    //获取优惠
    UIButton * promotionGetBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [promotionView addSubview:promotionGetBtn];
    [promotionGetBtn setTitle:@" 获取优惠 " forState:UIControlStateNormal];
    promotionGetBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    promotionGetBtn.layer.cornerRadius = 5;
    promotionGetBtn.layer.borderWidth = 1;
    promotionGetBtn.layer.borderColor = [[UIColor orangeColor] CGColor];
    [promotionGetBtn setTintColor:[UIColor orangeColor]];
    [promotionGetBtn addTarget:self action:@selector(defaultAction:) forControlEvents:UIControlEventTouchUpInside];
    promotionGetBtn.translatesAutoresizingMaskIntoConstraints = NO;
    
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionGetBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionEndTimeTitle attribute:NSLayoutAttributeTop multiplier:1 constant:-8]];
    
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionGetBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    
    
    
    //商家优惠logo
    UIImageView *promotionLogoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"promotionIcon2"]];
    [promotionView  addSubview:promotionLogoImageView];
    
    promotionLogoImageView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionLogoImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionLogoImageView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionLogoImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeHeight multiplier:0.5 constant:0]];
    [promotionView addConstraint:[NSLayoutConstraint constraintWithItem:promotionLogoImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeHeight multiplier:0.5 constant:0]];
    
    
    //看房团报名------------------------------------------
    scenesTourView= [[UIView alloc] init];
    [self.view addSubview:scenesTourView];
    scenesTourView.backgroundColor = [UIColor whiteColor];
    
    scenesTourView.translatesAutoresizingMaskIntoConstraints = NO;
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:promotionView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [scenesTourView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_SCENESTOUR]];
    
     //看房团内容区
    UIView *scenesTourContentView = [[UIView alloc] init];
    [scenesTourView addSubview:scenesTourContentView];
    scenesTourContentView.layer.cornerRadius = 10;
    scenesTourContentView.layer.borderColor = [[UIColor grayColor] CGColor];
    scenesTourContentView.layer.borderWidth = 0.5;
    
    scenesTourContentView.translatesAutoresizingMaskIntoConstraints = NO;
    [scenesTourView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourContentView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [scenesTourView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourContentView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [scenesTourView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourContentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeBottom multiplier:1 constant:-10]];
    [scenesTourView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourContentView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeRight multiplier:1 constant:-20]];
    
    //看房团图标
    UIImageView *scenesTourIconImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"scenesTourIcon"]];
    [scenesTourContentView addSubview:scenesTourIconImageView];
    scenesTourIconImageView.translatesAutoresizingMaskIntoConstraints = NO;
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourIconImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:scenesTourContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourIconImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:scenesTourContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourIconImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:50]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourIconImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:50]];
    
    //看房团图示标题
    UILabel * scenesTourIconTitle = [[UILabel alloc] init];
    [scenesTourContentView addSubview:scenesTourIconTitle];
    scenesTourIconTitle.text = @"看房团";
    scenesTourIconTitle.textColor = [UIColor grayColor];
    scenesTourIconTitle.font =[UIFont systemFontOfSize:14];
    
    scenesTourIconTitle.translatesAutoresizingMaskIntoConstraints = NO;
    
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourIconTitle attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:scenesTourIconImageView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourIconTitle attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:scenesTourIconImageView attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
    
    //看房团标题
    UILabel *scenesTourTitle = [[UILabel alloc] init];
    [scenesTourContentView addSubview:scenesTourTitle];
    scenesTourTitle.text = @"看团团报名中";
    scenesTourTitle.translatesAutoresizingMaskIntoConstraints = NO;
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourTitle attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:scenesTourContentView attribute:NSLayoutAttributeTop multiplier:1 constant:15]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourTitle attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:scenesTourIconImageView attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //看房团时间
    
    UILabel *scenesTourTime = [[UILabel alloc] init];
    [scenesTourContentView addSubview:scenesTourTime];
    scenesTourTime.text = @"2015-09-01";
    scenesTourTime.textColor = [UIColor grayColor];
    scenesTourTime.font = [UIFont systemFontOfSize:14];
    scenesTourTime.translatesAutoresizingMaskIntoConstraints = NO;
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourTime attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:scenesTourTitle attribute:NSLayoutAttributeBottom multiplier:1 constant:10]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourTime attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:scenesTourTitle attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    
    //看房团GO按钮
    UIButton *scenesTourGoBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [scenesTourContentView addSubview:scenesTourGoBtn];
    [scenesTourGoBtn setTitle:@"GO" forState:UIControlStateNormal];
    [scenesTourGoBtn setTintColor:[UIColor redColor]];
    [scenesTourGoBtn.titleLabel setFont:[UIFont systemFontOfSize:20]];
    scenesTourGoBtn.layer.borderColor = [[UIColor redColor] CGColor];
    scenesTourGoBtn.layer.borderWidth = 2;
    scenesTourGoBtn.layer.cornerRadius =25;
    [scenesTourGoBtn addTarget:self action:@selector(defaultAction:) forControlEvents:UIControlEventTouchUpInside];

    scenesTourGoBtn.translatesAutoresizingMaskIntoConstraints = NO;
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourGoBtn attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:scenesTourContentView attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
     [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourGoBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:scenesTourContentView attribute:NSLayoutAttributeRight multiplier:1 constant:-20]];
    
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourGoBtn attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:50]];
    [scenesTourContentView addConstraint:[NSLayoutConstraint constraintWithItem:scenesTourGoBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:50]];
    
    
    //楼盘参数---------------------------------------------------------------------
    housePropertiesView = [[UIView alloc] init];
    [self.view addSubview:housePropertiesView];
    housePropertiesView.backgroundColor = [UIColor whiteColor];
    housePropertiesView.layer.borderWidth = 0.3;
    housePropertiesView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    housePropertiesView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:scenesTourView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    //楼盘参数高度在下面设置约束
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:150]];
    
    
    //下拉指示栏
    UIView  *housePropertiesDropDownBar = [[UIView alloc] init];
    [housePropertiesView addSubview:housePropertiesDropDownBar];
    housePropertiesDropDownBar.backgroundColor = [UIColor whiteColor];
    housePropertiesDropDownBar.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    housePropertiesDropDownBar.layer.borderWidth =0.3;
    housePropertiesDropDownBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [housePropertiesView addConstraint: [NSLayoutConstraint constraintWithItem:housePropertiesDropDownBar attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesView addConstraint: [NSLayoutConstraint constraintWithItem:housePropertiesDropDownBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [housePropertiesView addConstraint: [NSLayoutConstraint constraintWithItem:housePropertiesDropDownBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [housePropertiesDropDownBar addConstraint: [NSLayoutConstraint constraintWithItem:housePropertiesDropDownBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:20]];
    
    housePropertiesDropDownBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_rightArrow"]];
    housePropertiesDropDownBarArrow.transform = CGAffineTransformMakeRotation(90*M_PI/180);
    [housePropertiesDropDownBar addSubview: housePropertiesDropDownBarArrow];
    housePropertiesDropDownBarArrow.translatesAutoresizingMaskIntoConstraints =NO;
    
    [housePropertiesDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDropDownBarArrow attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:housePropertiesDropDownBar attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
    [housePropertiesDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDropDownBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:housePropertiesDropDownBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [housePropertiesDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDropDownBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [housePropertiesDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDropDownBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    //手势动作
    UITapGestureRecognizer *housePropertiesDropDownBarGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(housePropertiesDropDownBarTouch:)];
    [housePropertiesDropDownBar addGestureRecognizer:housePropertiesDropDownBarGestureRecognizer];
    
    
    //标题栏
    UIView *housePropertiesTitleBar = [[UIView alloc] init];
    [housePropertiesView addSubview:housePropertiesTitleBar];
    housePropertiesTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    housePropertiesTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    housePropertiesTitleBar.layer.borderWidth = 0.5;
    housePropertiesTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    UILabel *housePropertiesTitleBarText = [[UILabel alloc] init];
    [housePropertiesTitleBar addSubview:housePropertiesTitleBarText];
    housePropertiesTitleBarText.text = @"楼盘参数";
    housePropertiesTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    housePropertiesTitleBarText.font=[UIFont systemFontOfSize:18];
    [housePropertiesTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:housePropertiesTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [housePropertiesTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *housePropertiesTitleBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];

    [housePropertiesTitleBar addSubview:housePropertiesTitleBarArrow];
    housePropertiesTitleBarArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:housePropertiesTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
     [housePropertiesTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBarArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:housePropertiesTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [housePropertiesTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [housePropertiesTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesTitleBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    //楼盘参数 内容
    UIView *housePropertiesContentView = [[UIView alloc] init];
    housePropertiesContentView.backgroundColor = [UIColor whiteColor];
    housePropertiesContentView.clipsToBounds = YES;
    [housePropertiesView addSubview:housePropertiesContentView];
    
    housePropertiesContentView.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesContentView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesContentView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesContentView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [housePropertiesView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesContentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:housePropertiesDropDownBar attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    
    //开业时间
    UILabel *housePropertiesOpenDateLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesOpenDateLabel];
    housePropertiesOpenDateLabel.text = @"开业时间:";
    housePropertiesOpenDateLabel.textColor = [UIColor grayColor];
    housePropertiesOpenDateLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesOpenDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesOpenDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesOpenDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    housePropertiesOpenDateValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesOpenDateValue];
    housePropertiesOpenDateValue.text = @"暂无";
    housePropertiesOpenDateValue.textColor = [UIColor grayColor];
    housePropertiesOpenDateValue.font = [UIFont systemFontOfSize:14];
    housePropertiesOpenDateValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesOpenDateValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesOpenDateValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesOpenDateLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //规划业态
    UILabel *housePropertiesPlanIndustLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesPlanIndustLabel];
    housePropertiesPlanIndustLabel.text = @"规划业态:";
    housePropertiesPlanIndustLabel.textColor = [UIColor grayColor];
    housePropertiesPlanIndustLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesPlanIndustLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanIndustLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesOpenDateLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanIndustLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesOpenDateLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesPlanIndustValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesPlanIndustValue];
    housePropertiesPlanIndustValue.text = @"暂无";
    housePropertiesPlanIndustValue.textColor = [UIColor grayColor];
    housePropertiesPlanIndustValue.font = [UIFont systemFontOfSize:14];
    housePropertiesPlanIndustValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanIndustValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanIndustLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanIndustValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanIndustLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    
    //建筑类型
    UILabel *housePropertiesBuildTypeLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesBuildTypeLabel];
    housePropertiesBuildTypeLabel.text = @"建筑类型:";
    housePropertiesBuildTypeLabel.textColor = [UIColor grayColor];
    housePropertiesBuildTypeLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesBuildTypeLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildTypeLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanIndustLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildTypeLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanIndustLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesBuildTypeValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesBuildTypeValue];
    housePropertiesBuildTypeValue.text = @"暂无";
    housePropertiesBuildTypeValue.textColor = [UIColor grayColor];
    housePropertiesBuildTypeValue.font = [UIFont systemFontOfSize:14];
    housePropertiesBuildTypeValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildTypeValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildTypeLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildTypeValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildTypeLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //规划类型
    UILabel *housePropertiesPlanTypeLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesPlanTypeLabel];
    housePropertiesPlanTypeLabel.text = @"规划类型:";
    housePropertiesPlanTypeLabel.textColor = [UIColor grayColor];
    housePropertiesPlanTypeLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesPlanTypeLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanTypeLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildTypeLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanTypeLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildTypeLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesPlanTypeValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesPlanTypeValue];
    housePropertiesPlanTypeValue.text = @"暂无";
    housePropertiesPlanTypeValue.textColor = [UIColor grayColor];
    housePropertiesPlanTypeValue.font = [UIFont systemFontOfSize:14];
    housePropertiesPlanTypeValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanTypeValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanTypeLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlanTypeValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanTypeLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //建筑面积
    UILabel *housePropertiesBuildAreaLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesBuildAreaLabel];
    housePropertiesBuildAreaLabel.text = @"建筑面积:";
    housePropertiesBuildAreaLabel.textColor = [UIColor grayColor];
    housePropertiesBuildAreaLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesBuildAreaLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildAreaLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanTypeLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildAreaLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlanTypeLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesBuildAreaValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesBuildAreaValue];
    housePropertiesBuildAreaValue.text = @"暂无";
    housePropertiesBuildAreaValue.textColor = [UIColor grayColor];
    housePropertiesBuildAreaValue.font = [UIFont systemFontOfSize:14];
    housePropertiesBuildAreaValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildAreaValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildAreaLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildAreaValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildAreaLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //公摊率
    UILabel *housePropertiesShareRatioLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesShareRatioLabel];
    housePropertiesShareRatioLabel.text = @"公摊率:";
    housePropertiesShareRatioLabel.textColor = [UIColor grayColor];
    housePropertiesShareRatioLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesShareRatioLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesShareRatioLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildAreaLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesShareRatioLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildAreaLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesShareRatioValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesShareRatioValue];
    housePropertiesShareRatioValue.text = @"暂无";
    housePropertiesShareRatioValue.textColor = [UIColor grayColor];
    housePropertiesShareRatioValue.font = [UIFont systemFontOfSize:14];
    housePropertiesShareRatioValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesShareRatioValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesShareRatioLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesShareRatioValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesShareRatioLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //容积率
    UILabel *housePropertiesPlotRatioLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesPlotRatioLabel];
    housePropertiesPlotRatioLabel.text = @"容积率:";
    housePropertiesPlotRatioLabel.textColor = [UIColor grayColor];
    housePropertiesPlotRatioLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesPlotRatioLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlotRatioLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesShareRatioLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlotRatioLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesShareRatioLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesPlotRatioValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesPlotRatioValue];
    housePropertiesPlotRatioValue.text = @"暂无";
    housePropertiesPlotRatioValue.textColor = [UIColor grayColor];
    housePropertiesPlotRatioValue.font = [UIFont systemFontOfSize:14];
    housePropertiesPlotRatioValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlotRatioValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlotRatioLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesPlotRatioValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlotRatioLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //绿化率
    UILabel *housePropertiesGreenRatioLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesGreenRatioLabel];
    housePropertiesGreenRatioLabel.text = @"绿化率:";
    housePropertiesGreenRatioLabel.textColor = [UIColor grayColor];
    housePropertiesGreenRatioLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesGreenRatioLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesGreenRatioLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlotRatioLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesGreenRatioLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesPlotRatioLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesGreenRatioValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesGreenRatioValue];
    housePropertiesGreenRatioValue.text = @"暂无";
    housePropertiesGreenRatioValue.textColor = [UIColor grayColor];
    housePropertiesGreenRatioValue.font = [UIFont systemFontOfSize:14];
    housePropertiesGreenRatioValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesGreenRatioValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesGreenRatioLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesGreenRatioValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesGreenRatioLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    
    //地上车位数
    UILabel *housePropertiesParkingPlaceAmountLabel1 = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesParkingPlaceAmountLabel1];
    housePropertiesParkingPlaceAmountLabel1.text = @"地上车位数:";
    housePropertiesParkingPlaceAmountLabel1.textColor = [UIColor grayColor];
    housePropertiesParkingPlaceAmountLabel1.font = [UIFont systemFontOfSize:14];
    housePropertiesParkingPlaceAmountLabel1.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountLabel1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesGreenRatioLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountLabel1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesGreenRatioLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesParkingPlaceAmountValue1 = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesParkingPlaceAmountValue1];
    housePropertiesParkingPlaceAmountValue1.text = @"暂无";
    housePropertiesParkingPlaceAmountValue1.textColor = [UIColor grayColor];
    housePropertiesParkingPlaceAmountValue1.font = [UIFont systemFontOfSize:14];
    housePropertiesParkingPlaceAmountValue1.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountValue1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel1 attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountValue1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel1 attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //地下车位数
    UILabel *housePropertiesParkingPlaceAmountLabel2 = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesParkingPlaceAmountLabel2];
    housePropertiesParkingPlaceAmountLabel2.text = @"地下车位数:";
    housePropertiesParkingPlaceAmountLabel2.textColor = [UIColor grayColor];
    housePropertiesParkingPlaceAmountLabel2.font = [UIFont systemFontOfSize:14];
    housePropertiesParkingPlaceAmountLabel2.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountLabel2 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel1 attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountLabel2 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel1 attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesParkingPlaceAmountValue2 = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesParkingPlaceAmountValue2];
    housePropertiesParkingPlaceAmountValue2.text = @"暂无";
    housePropertiesParkingPlaceAmountValue2.textColor = [UIColor grayColor];
    housePropertiesParkingPlaceAmountValue2.font = [UIFont systemFontOfSize:14];
    housePropertiesParkingPlaceAmountValue2.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountValue2 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel2 attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesParkingPlaceAmountValue2 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel2 attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //物业数量
    UILabel *housePropertiesBuildingAmountLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesBuildingAmountLabel];
    housePropertiesBuildingAmountLabel.text = @"物业数量:";
    housePropertiesBuildingAmountLabel.textColor = [UIColor grayColor];
    housePropertiesBuildingAmountLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesBuildingAmountLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildingAmountLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel2 attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildingAmountLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesParkingPlaceAmountLabel2 attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesBuildingAmountValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesBuildingAmountValue];
    housePropertiesBuildingAmountValue.text = @"暂无";
    housePropertiesBuildingAmountValue.textColor = [UIColor grayColor];
    housePropertiesBuildingAmountValue.font = [UIFont systemFontOfSize:14];
    housePropertiesBuildingAmountValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildingAmountValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildingAmountLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesBuildingAmountValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildingAmountLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //开发商
    UILabel *housePropertiesDevelaperLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesDevelaperLabel];
    housePropertiesDevelaperLabel.text = @"开发商:";
    housePropertiesDevelaperLabel.textColor = [UIColor grayColor];
    housePropertiesDevelaperLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesDevelaperLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDevelaperLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildingAmountLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDevelaperLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesBuildingAmountLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesDevelaperValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesDevelaperValue];
    housePropertiesDevelaperValue.text = @"暂无";
    housePropertiesDevelaperValue.textColor = [UIColor grayColor];
    housePropertiesDevelaperValue.font = [UIFont systemFontOfSize:14];
    housePropertiesDevelaperValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDevelaperValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesDevelaperLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesDevelaperValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesDevelaperLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //运营管理公司
    UILabel *housePropertiesManagementCompanyLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesManagementCompanyLabel];
    housePropertiesManagementCompanyLabel.text = @"运营管理公司:";
    housePropertiesManagementCompanyLabel.textColor = [UIColor grayColor];
    housePropertiesManagementCompanyLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesManagementCompanyLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesManagementCompanyLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesDevelaperLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesManagementCompanyLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesDevelaperLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesManagementCompanyValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesManagementCompanyValue];
    housePropertiesManagementCompanyValue.text = @"暂无";
    housePropertiesManagementCompanyValue.textColor = [UIColor grayColor];
    housePropertiesManagementCompanyValue.font = [UIFont systemFontOfSize:14];
    housePropertiesManagementCompanyValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesManagementCompanyValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesManagementCompanyLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesManagementCompanyValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesManagementCompanyLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //产权年限
    UILabel *housePropertiesYearOfPropertyRightLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesYearOfPropertyRightLabel];
    housePropertiesYearOfPropertyRightLabel.text = @"产权年限:";
    housePropertiesYearOfPropertyRightLabel.textColor = [UIColor grayColor];
    housePropertiesYearOfPropertyRightLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesYearOfPropertyRightLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesYearOfPropertyRightLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesManagementCompanyLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesYearOfPropertyRightLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesManagementCompanyLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesYearOfPropertyRightValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesYearOfPropertyRightValue];
    housePropertiesYearOfPropertyRightValue.text = @"暂无";
    housePropertiesYearOfPropertyRightValue.textColor = [UIColor grayColor];
    housePropertiesYearOfPropertyRightValue.font = [UIFont systemFontOfSize:14];
    housePropertiesYearOfPropertyRightValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesYearOfPropertyRightValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesYearOfPropertyRightLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesYearOfPropertyRightValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesYearOfPropertyRightLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //开工时间
    UILabel *housePropertiesStartDateLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesStartDateLabel];
    housePropertiesStartDateLabel.text = @"开工时间:";
    housePropertiesStartDateLabel.textColor = [UIColor grayColor];
    housePropertiesStartDateLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesStartDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesStartDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesYearOfPropertyRightLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesStartDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesYearOfPropertyRightLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesStartDateValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesStartDateValue];
    housePropertiesStartDateValue.text = @"暂无";
    housePropertiesStartDateValue.textColor = [UIColor grayColor];
    housePropertiesStartDateValue.font = [UIFont systemFontOfSize:14];
    housePropertiesStartDateValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesStartDateValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesStartDateLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesStartDateValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesStartDateLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //竣工时间
    UILabel *housePropertiesEndDateLabel = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesEndDateLabel];
    housePropertiesEndDateLabel.text = @"竣工时间:";
    housePropertiesEndDateLabel.textColor = [UIColor grayColor];
    housePropertiesEndDateLabel.font = [UIFont systemFontOfSize:14];
    housePropertiesEndDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesEndDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesStartDateLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesEndDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesStartDateLabel attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    housePropertiesEndDateValue = [[UILabel alloc]init];
    [housePropertiesContentView addSubview:housePropertiesEndDateValue];
    housePropertiesEndDateValue.text = @"暂无";
    housePropertiesEndDateValue.textColor = [UIColor grayColor];
    housePropertiesEndDateValue.font = [UIFont systemFontOfSize:14];
    housePropertiesEndDateValue.translatesAutoresizingMaskIntoConstraints = NO;
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesEndDateValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesEndDateLabel attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [housePropertiesContentView addConstraint:[NSLayoutConstraint constraintWithItem:housePropertiesEndDateValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesEndDateLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    
    //户型图---------------------------------------------------------------------
    houseModelGraphicView = [[UIView alloc] init];
    [self.view addSubview:houseModelGraphicView];
    houseModelGraphicView.backgroundColor = [UIColor purpleColor];
    houseModelGraphicView.layer.borderWidth = 0.3;
    houseModelGraphicView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    houseModelGraphicView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:housePropertiesView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    //户型图高度在下面设置约束
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_HOUSEMODELGRAPHICVIEW]];
    
    
    //标题栏
    UIView *houseModelGraphicViewTitleBar = [[UIView alloc] init];
    [houseModelGraphicView addSubview:houseModelGraphicViewTitleBar];
    houseModelGraphicViewTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    houseModelGraphicViewTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    houseModelGraphicViewTitleBar.layer.borderWidth = 0.5;
    houseModelGraphicViewTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    houseModelGraphicViewTitleBarText = [[UILabel alloc] init];
    [houseModelGraphicViewTitleBar addSubview:houseModelGraphicViewTitleBarText];
    houseModelGraphicViewTitleBarText.text = @"户型图(0)";
    houseModelGraphicViewTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    houseModelGraphicViewTitleBarText.font=[UIFont systemFontOfSize:18];
    [houseModelGraphicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [houseModelGraphicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *houseModelGraphicViewTitleBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [houseModelGraphicViewTitleBar addSubview:houseModelGraphicViewTitleBarArrow];
    houseModelGraphicViewTitleBarArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [houseModelGraphicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [houseModelGraphicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBarArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [houseModelGraphicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [houseModelGraphicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:houseModelGraphicViewTitleBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    
    //户型图内容
    UICollectionViewFlowLayout *modelGraphicsCollectionLayout = [[UICollectionViewFlowLayout alloc] init];
    
    //单元格大小
    modelGraphicsCollectionLayout.itemSize =CGSizeMake(160, 130);

    //行间距
    //hotCityCollectionLayout.minimumLineSpacing = 10;
    
    
    //列间距
    //hotCityCollectionLayout.minimumInteritemSpacing =20;
    [modelGraphicsCollectionLayout setSectionInset:UIEdgeInsetsMake(10, 20, 10, 20)];
    [modelGraphicsCollectionLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
    
    modelGraphicsCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) collectionViewLayout:modelGraphicsCollectionLayout];
    modelGraphicsCollectionView.tag = KVN_COLLECTION_VIEW_MODEL;
    modelGraphicsCollectionView.alwaysBounceHorizontal = YES;
    modelGraphicsCollectionView.showsHorizontalScrollIndicator = NO;
    modelGraphicsCollectionView.delegate = self;
    modelGraphicsCollectionView.dataSource = self;
    // [hotCityCollectionView setScrollEnabled:YES];
    modelGraphicsCollectionView.backgroundColor = [UIColor whiteColor];
    //注册cell
    [modelGraphicsCollectionView registerClass:[KVNHouseGraphicsCollectionViewCell class] forCellWithReuseIdentifier:@"HOUSE_MODEL_GRAPHICS_COLLECTION_CELL"];
    [houseModelGraphicView addSubview:modelGraphicsCollectionView];
    
    
    modelGraphicsCollectionView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:modelGraphicsCollectionView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicViewTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:modelGraphicsCollectionView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:modelGraphicsCollectionView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    
    [houseModelGraphicView addConstraint:[NSLayoutConstraint constraintWithItem:modelGraphicsCollectionView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    
    
    //地图找房------------------------------------------------------------------------------------
    findHouseInMapView = [[UIView alloc] init];
    [self.view addSubview:findHouseInMapView];
    findHouseInMapView.backgroundColor = [UIColor purpleColor];
    findHouseInMapView.layer.borderWidth = 0.3;
    findHouseInMapView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    findHouseInMapView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:houseModelGraphicView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_FINDHOUSEINMAPVIEW]];
    
    
    //标题栏
    UIView *findHouseInMapViewTitleBar = [[UIView alloc] init];
    [findHouseInMapView addSubview:findHouseInMapViewTitleBar];
    findHouseInMapViewTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    findHouseInMapViewTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    findHouseInMapViewTitleBar.layer.borderWidth = 0.5;
    findHouseInMapViewTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    UILabel *findHouseInMapViewTitleBarText = [[UILabel alloc] init];
    [findHouseInMapViewTitleBar addSubview:findHouseInMapViewTitleBarText];
    findHouseInMapViewTitleBarText.text = @"地图找房";
    findHouseInMapViewTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    findHouseInMapViewTitleBarText.font=[UIFont systemFontOfSize:18];
    [findHouseInMapViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [findHouseInMapViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *findHouseInMapViewTitleBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [findHouseInMapViewTitleBar addSubview:findHouseInMapViewTitleBarArrow];
    findHouseInMapViewTitleBarArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [findHouseInMapViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [findHouseInMapViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBarArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [findHouseInMapViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [findHouseInMapViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapViewTitleBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    
    //内容视图
    UIView * findHouseInMapContentView = [[UIView alloc] init];
    findHouseInMapContentView.backgroundColor = [UIColor whiteColor];
    [findHouseInMapView addSubview:findHouseInMapContentView];
    findHouseInMapContentView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapContentView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapViewTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapContentView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapContentView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [findHouseInMapView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapContentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    //地址
    UILabel *findHouseInMapAddressLabel = [[UILabel alloc]init];
    [findHouseInMapContentView addSubview:findHouseInMapAddressLabel];
    findHouseInMapAddressLabel.text = @"地址";
    findHouseInMapAddressLabel.translatesAutoresizingMaskIntoConstraints = NO;
    
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapAddressLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapAddressLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    findHouseInMapAddressValue = [[UILabel alloc] init];
    [findHouseInMapContentView addSubview:findHouseInMapAddressValue];
    findHouseInMapAddressValue.text = @"黄埔欧洲城一路以南";
    findHouseInMapAddressValue.textColor = [UIColor grayColor];
    findHouseInMapAddressValue.translatesAutoresizingMaskIntoConstraints = NO;
    
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapAddressValue attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapAddressValue attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapAddressLabel attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    //地图静态图
    //地图
    NSString *mapPicUrl = [[NSString alloc] initWithFormat:@"http://api.map.baidu.com/staticimage?center=116.403874,39.914888&width=%f&height=200&zoom=11",appFrame.size.width];
    findHouseInMapStaticImageView = [[UIImageView alloc] init];
    [findHouseInMapContentView addSubview:findHouseInMapStaticImageView];
    [findHouseInMapStaticImageView setImageFromURL:[NSURL URLWithString:mapPicUrl]];
    findHouseInMapStaticImageView.translatesAutoresizingMaskIntoConstraints = NO;
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapStaticImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapAddressLabel attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapStaticImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapStaticImageView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeRight multiplier:1 constant:-10]];
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapStaticImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:150]];
    
    
    //周边配套：
    UILabel *findHouseInMapSurroundFacilities = [[UILabel alloc] init];
    [findHouseInMapContentView addSubview:findHouseInMapSurroundFacilities];
    findHouseInMapSurroundFacilities.text = @"周边配套:地铁、公交、学校...";

    findHouseInMapSurroundFacilities.translatesAutoresizingMaskIntoConstraints = NO;
    [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapSurroundFacilities attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapStaticImageView attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
     [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapSurroundFacilities attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
     [findHouseInMapContentView addConstraint:[NSLayoutConstraint constraintWithItem:findHouseInMapSurroundFacilities attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:findHouseInMapContentView attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    
    
    //动态------------------------------------------------------------
    dynamicView = [[UIView alloc] init];
    [self.view addSubview:dynamicView];
    dynamicView.backgroundColor = [UIColor purpleColor];
    dynamicView.layer.borderWidth = 0.3;
    dynamicView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    dynamicView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:dynamicView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:dynamicView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:dynamicView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:findHouseInMapView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:dynamicView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_DYNAMICVIEW]];
    
    
    //标题栏
    UIView *dynamicViewTitleBar = [[UIView alloc] init];
    [dynamicView addSubview:dynamicViewTitleBar];
    dynamicViewTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    dynamicViewTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    dynamicViewTitleBar.layer.borderWidth = 0.5;
    dynamicViewTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    dynamicViewTitleBarText = [[UILabel alloc] init];
    [dynamicViewTitleBar addSubview:dynamicViewTitleBarText];
    dynamicViewTitleBarText.text = @"动态(0)";
    dynamicViewTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    dynamicViewTitleBarText.font=[UIFont systemFontOfSize:18];
    [dynamicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:dynamicViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [dynamicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:dynamicViewTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *dynamicViewTitleBarTextArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [dynamicViewTitleBar addSubview:dynamicViewTitleBarTextArrow];
    dynamicViewTitleBarTextArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [dynamicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBarTextArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:dynamicViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [dynamicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBarTextArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:dynamicViewTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [dynamicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBarTextArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [dynamicViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:dynamicViewTitleBarTextArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    //动态内容
    UIView *dynamicContentView = [[UIView alloc] init];
    dynamicContentView.backgroundColor = [UIColor whiteColor];
    [dynamicView addSubview:dynamicContentView];
    dynamicContentView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:dynamicViewTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [dynamicView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    
    //内容
    dynamicContentTitle = [[UILabel alloc] init];
    dynamicContentTitle.text = @"暂无";
    [dynamicContentView addSubview:dynamicContentTitle];
    dynamicContentTitle.translatesAutoresizingMaskIntoConstraints = NO;
    [dynamicContentView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentTitle attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:dynamicContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [dynamicContentView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentTitle attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:dynamicContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [dynamicContentView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentTitle attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:dynamicContentView attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    dynamicContentDate = [[UILabel alloc] init];
    dynamicContentDate.text = @"暂无";
    dynamicContentDate.textColor = [UIColor grayColor];
    dynamicContentDate.font = [UIFont systemFontOfSize: 14];
    [dynamicContentView addSubview:dynamicContentDate];
    dynamicContentDate.translatesAutoresizingMaskIntoConstraints = NO;
    [dynamicContentView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentDate attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:dynamicContentTitle attribute:NSLayoutAttributeBottom multiplier:1 constant:10]];
    [dynamicContentView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentDate attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:dynamicContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [dynamicContentView addConstraint:[NSLayoutConstraint constraintWithItem:dynamicContentDate attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:dynamicContentView attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //项目简介------------------------------------------------
    projectIntroView = [[UIView alloc] init];
    [self.view addSubview:projectIntroView];
    projectIntroView.backgroundColor = [UIColor purpleColor];
    projectIntroView.layer.borderWidth = 0.3;
    projectIntroView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    projectIntroView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:dynamicView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    //高度下面设置
    //[self.view addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:280]];
    
    
   
    UIView *projectIntroViewTitleBar = [[UIView alloc] init];
    [projectIntroView addSubview:projectIntroViewTitleBar];
    projectIntroViewTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    projectIntroViewTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    projectIntroViewTitleBar.layer.borderWidth = 0.5;
    projectIntroViewTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    UILabel *projectIntroViewTitleBarText = [[UILabel alloc] init];
    [projectIntroViewTitleBar addSubview:projectIntroViewTitleBarText];
    projectIntroViewTitleBarText.text = @"项目简介";
    projectIntroViewTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    projectIntroViewTitleBarText.font=[UIFont systemFontOfSize:18];
    [projectIntroViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:projectIntroViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [projectIntroViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroViewTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *projectIntroViewTitleBarTextArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [projectIntroViewTitleBar addSubview:projectIntroViewTitleBarTextArrow];
    projectIntroViewTitleBarTextArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [projectIntroViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBarTextArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:projectIntroViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [projectIntroViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBarTextArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroViewTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [projectIntroViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBarTextArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [projectIntroViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroViewTitleBarTextArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];

    //内容
    projectIntroContentView = [[UIView alloc] init];
    projectIntroContentView.backgroundColor = [UIColor whiteColor];
    projectIntroContentView.clipsToBounds = YES;
    [projectIntroView addSubview:projectIntroContentView];
    projectIntroContentView.translatesAutoresizingMaskIntoConstraints = NO;
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroViewTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    //高度在下面设置

    
    
    //楼盘简介Label
    UILabel * projectIntroContentLabel1 = [[UILabel alloc]init];
    projectIntroContentLabel1.text = @"楼盘简介";
    projectIntroContentLabel1.textColor = [UIColor redColor];
    
    [projectIntroContentView addSubview:projectIntroContentLabel1];
    projectIntroContentLabel1.translatesAutoresizingMaskIntoConstraints = NO;
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentLabel1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentLabel1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentLabel1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //楼盘简介内容
    projectIntroContentTextView1 = [[UILabel alloc]init];
    [projectIntroContentTextView1  setNumberOfLines:0];
    projectIntroContentTextView1.backgroundColor = [UIColor whiteColor];
    projectIntroContentTextView1.textColor = [UIColor grayColor];
    projectIntroContentTextView1.font = [UIFont systemFontOfSize: 14];

    [projectIntroContentView addSubview:projectIntroContentTextView1];
    projectIntroContentTextView1.translatesAutoresizingMaskIntoConstraints = NO;
    
    [projectIntroContentView addConstraint: [NSLayoutConstraint constraintWithItem:projectIntroContentTextView1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroContentLabel1 attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentTextView1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentTextView1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeRight multiplier:1 constant:-10]];
    
    
    projectIntroContentTextView1.text= @"暂无";
    
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setFirstLineHeadIndent:20];
    NSMutableAttributedString *projectIntroContentTextView1AttrStr = [[NSMutableAttributedString alloc] initWithString:projectIntroContentTextView1.text];
    [projectIntroContentTextView1AttrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,  projectIntroContentTextView1.text.length)];
    projectIntroContentTextView1.attributedText =projectIntroContentTextView1AttrStr;
    
    
    //发展商背景Label
    UILabel * projectIntroContentLabel2 = [[UILabel alloc]init];
    projectIntroContentLabel2.text = @"发展商背景";
    projectIntroContentLabel2.textColor = [UIColor redColor];
    
    [projectIntroContentView addSubview:projectIntroContentLabel2];
    projectIntroContentLabel2.translatesAutoresizingMaskIntoConstraints = NO;
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentLabel2 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroContentTextView1 attribute:NSLayoutAttributeBottom multiplier:1 constant:10]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentLabel2 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentLabel2 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeRight multiplier:1 constant:10]];
    
    
    //发展商背景内容
    projectIntroContentTextView2 = [[UILabel alloc]init];
    [projectIntroContentTextView2  setNumberOfLines:0];
    projectIntroContentTextView2.backgroundColor = [UIColor whiteColor];
    projectIntroContentTextView2.textColor = [UIColor grayColor];
    projectIntroContentTextView2.font = [UIFont systemFontOfSize: 14];
    
    [projectIntroContentView addSubview:projectIntroContentTextView2];
    projectIntroContentTextView2.translatesAutoresizingMaskIntoConstraints = NO;
    [projectIntroContentView addConstraint: [NSLayoutConstraint constraintWithItem:projectIntroContentTextView2 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroContentLabel2 attribute:NSLayoutAttributeBottom multiplier:1 constant:5]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentTextView2 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [projectIntroContentView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentTextView2 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeRight multiplier:1 constant:-10]];
    
    
    projectIntroContentTextView2.text= @"暂无";
    
    NSMutableAttributedString *projectIntroContentTextView2AttrStr = [[NSMutableAttributedString alloc] initWithString:projectIntroContentTextView2.text];
    [projectIntroContentTextView2AttrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,  projectIntroContentTextView2.text.length)];
    projectIntroContentTextView2.attributedText =projectIntroContentTextView2AttrStr;
    
    //下拉指示器
    //下拉指示栏
    UIView  *projectIntroDropDownBar = [[UIView alloc] init];
    [projectIntroView addSubview:projectIntroDropDownBar];
    projectIntroDropDownBar.backgroundColor = [UIColor whiteColor];
    projectIntroDropDownBar.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    projectIntroDropDownBar.layer.borderWidth =0.3;
    projectIntroDropDownBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [projectIntroView addConstraint: [NSLayoutConstraint constraintWithItem:projectIntroDropDownBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroContentView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [projectIntroView addConstraint: [NSLayoutConstraint constraintWithItem:projectIntroDropDownBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [projectIntroView addConstraint: [NSLayoutConstraint constraintWithItem:projectIntroDropDownBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [projectIntroDropDownBar addConstraint: [NSLayoutConstraint constraintWithItem:projectIntroDropDownBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:20]];
    
    projectIntroDropDownBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_rightArrow"]];
    projectIntroDropDownBarArrow.transform = CGAffineTransformMakeRotation(90*M_PI/180);
    [projectIntroDropDownBar addSubview: projectIntroDropDownBarArrow];
    projectIntroDropDownBarArrow.translatesAutoresizingMaskIntoConstraints =NO;
    
    [projectIntroDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroDropDownBarArrow attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:projectIntroDropDownBar attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
    [projectIntroDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroDropDownBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:projectIntroDropDownBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    
    [projectIntroDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroDropDownBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    
    [projectIntroDropDownBar addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroDropDownBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    //手势动作
    UITapGestureRecognizer *projectIntroDropDownBarGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(projectIntroDropDownBarTouch:)];
    [projectIntroDropDownBar addGestureRecognizer:projectIntroDropDownBarGestureRecognizer];
    
    //项目简介高度
     _projectIntroViewHeightConstraint1 = [NSLayoutConstraint constraintWithItem:projectIntroContentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:projectIntroContentTextView2 attribute:NSLayoutAttributeBottom multiplier:1 constant:10];
    //[projectIntroView addConstraint:_projectIntroViewHeightConstraint1];
    
    _projectIntroViewHeightConstraint2 = [NSLayoutConstraint constraintWithItem:projectIntroContentView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:120];
    [projectIntroView addConstraint:_projectIntroViewHeightConstraint2];
    
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:projectIntroDropDownBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    
    
    
    //在线评房 ---------------------------------------------------
    commentView = [[UIView alloc] init];
    [self.view addSubview:commentView];
    commentView.backgroundColor = [UIColor purpleColor];
    commentView.layer.borderWidth = 0.3;
    commentView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    commentView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:commentView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:commentView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:commentView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:projectIntroView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:commentView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_COMMENTVIEW]];
    
    
    //标题栏
    UIView *commentViewTitleBar = [[UIView alloc] init];
    [commentView addSubview:commentViewTitleBar];
    commentViewTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    commentViewTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    commentViewTitleBar.layer.borderWidth = 0.5;
    commentViewTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [commentView addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:commentView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [commentView addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:commentView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [commentView addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:commentView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [commentView addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    UILabel *commentViewTitleBarText = [[UILabel alloc] init];
    [commentViewTitleBar addSubview:commentViewTitleBarText];
    commentViewTitleBarText.text = @"在线评房";
    commentViewTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    commentViewTitleBarText.font=[UIFont systemFontOfSize:18];
    [commentViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:commentViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [commentViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:commentViewTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *commentViewTitleBarTextArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [commentViewTitleBar addSubview:commentViewTitleBarTextArrow];
    commentViewTitleBarTextArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [commentViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBarTextArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:commentViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [commentViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBarTextArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:commentViewTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [commentViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBarTextArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [commentViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:commentViewTitleBarTextArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    
    //在线评房内容
    commentTableView = [[UITableView alloc]init];
    [commentView addSubview:commentTableView];
    UIView * commentTableHeaderView = [[UIView alloc]init];
    [commentTableView setTableHeaderView:commentTableHeaderView];
    
    commentTableHeaderStarView = [[KVNCommentStarView alloc] initWithFrame:CGRectMake(10, 10, 200, 50)];
    [commentTableHeaderView addSubview:commentTableHeaderStarView];
    commentTableHeaderStarView.showStar = 0.0 * 20;
    commentTableHeaderStarView.startSize = 24;
    //commentTableView的layout
    commentTableView.frame = CGRectMake(0, 50, appFrame.size.width, 370);
    
    //commentTableHeaderView的layout
    commentTableHeaderView.frame = CGRectMake(0, 0, appFrame.size.width, 80);
    commentTableHeaderView.backgroundColor = [UIColor whiteColor];
    
    //总分
    commentTableHeaderViewTotalScoreLabel = [[UILabel alloc] init];
    [commentTableHeaderView addSubview:commentTableHeaderViewTotalScoreLabel];
    commentTableHeaderViewTotalScoreLabel.text = @"4.0分";
    commentTableHeaderViewTotalScoreLabel.textColor = [UIColor orangeColor];
    commentTableHeaderViewTotalScoreLabel.frame = CGRectMake(140, 10, 50, 30);

    commentTableHeaderViewDetailScoreLabel = [[UILabel alloc] init];
    [commentTableHeaderView addSubview:commentTableHeaderViewDetailScoreLabel];
    commentTableHeaderViewDetailScoreLabel.text=@"价格0.0分 地段0.0分 配套0.0分 交通0.0分 环境0.0分";
    commentTableHeaderViewDetailScoreLabel.textColor = [UIColor grayColor];
    commentTableHeaderViewDetailScoreLabel.frame = CGRectMake(10, 40, appFrame.size.width, 30);
    commentTableHeaderViewDetailScoreLabel.font = [UIFont systemFontOfSize:14];
    
    
    
    //tabaleView的配置
    commentTableView.tag = KVN_TABLEVIEW_COMMENT;
    commentTableView.delegate = self;
    commentTableView.dataSource = self;
    commentTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    //commentTableView.contentInset = UIEdgeInsetsMake(80, 0, 0, 0);
    //commentTableView.scrollIndicatorInsets = UIEdgeInsetsMake(80, 0, 0, 0);
    commentTableView.rowHeight = UITableViewAutomaticDimension;
    commentTableView.estimatedRowHeight = 120;
    commentTableView.allowsSelection = NO;
    
    //footer
    UIView *commentTableViewFooterView = [[UIView alloc] init];
    commentTableViewFooterView.frame = CGRectMake(0, 0, appFrame.size.width, 50);
    
    [commentTableView setTableFooterView:commentTableViewFooterView];
    UIButton *commentTableViewfoooterButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [commentTableViewfoooterButton setTitle:@"马上点评" forState:UIControlStateNormal];
    [commentTableViewfoooterButton setTintColor:[UIColor redColor]];
    commentTableViewfoooterButton.layer.borderColor = [[UIColor redColor] CGColor];
    commentTableViewfoooterButton.layer.borderWidth = 0.5;
    commentTableViewfoooterButton.layer.cornerRadius = 5;
    [commentTableViewfoooterButton addTarget:self action:@selector(defaultAction:) forControlEvents:UIControlEventTouchUpInside];
    [commentTableViewFooterView addSubview:commentTableViewfoooterButton];
    
    commentTableViewfoooterButton.translatesAutoresizingMaskIntoConstraints = NO;
    
    [commentTableViewFooterView addConstraint:[NSLayoutConstraint constraintWithItem:commentTableViewfoooterButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:commentTableViewFooterView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
    [commentTableViewFooterView addConstraint:[NSLayoutConstraint constraintWithItem:commentTableViewfoooterButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:commentTableViewFooterView attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    [commentTableViewFooterView addConstraint:[NSLayoutConstraint constraintWithItem:commentTableViewfoooterButton attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:commentTableViewFooterView attribute:NSLayoutAttributeRight multiplier:1 constant:-10]];
    [commentTableViewFooterView addConstraint:[NSLayoutConstraint constraintWithItem:commentTableViewfoooterButton attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:commentTableViewFooterView attribute:NSLayoutAttributeBottom multiplier:1 constant:-10]];
   
    
    
    //房价走势---------------------------------------------------------------
    priceTendencyView = [[UIView alloc] init];
    [self.view addSubview:priceTendencyView];
    priceTendencyView.backgroundColor = [UIColor purpleColor];
    priceTendencyView.layer.borderWidth = 0.3;
    priceTendencyView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    priceTendencyView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:commentView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:commentView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:commentView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_PRICETENDENCYVIEW]];
    
    
    //标题栏
    UIView *priceTendencyTitleBar = [[UIView alloc] init];
    [priceTendencyView addSubview:priceTendencyTitleBar];
    priceTendencyTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    priceTendencyTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    priceTendencyTitleBar.layer.borderWidth = 0.5;
    priceTendencyTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [priceTendencyView addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:priceTendencyView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [priceTendencyView addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:priceTendencyView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [priceTendencyView addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:priceTendencyView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [priceTendencyView addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    UILabel *priceTendencyTitleBarText = [[UILabel alloc] init];
    [priceTendencyTitleBar addSubview:priceTendencyTitleBarText];
    priceTendencyTitleBarText.text = @"房价走势";
    priceTendencyTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    priceTendencyTitleBarText.font=[UIFont systemFontOfSize:18];
    [priceTendencyTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:priceTendencyTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [priceTendencyTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencyTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:priceTendencyTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
   
    priceTendencySegmentedControl = [[UISegmentedControl alloc] initWithItems:@[@"一年",@"两年"]];
    
    [priceTendencyTitleBar addSubview:priceTendencySegmentedControl];
    
    priceTendencySegmentedControl.translatesAutoresizingMaskIntoConstraints = NO;
    [priceTendencyTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencySegmentedControl attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:priceTendencyTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [priceTendencyTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencySegmentedControl attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:priceTendencyTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-10]];
    [priceTendencyTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencySegmentedControl attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:90]];
    [priceTendencyTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:priceTendencySegmentedControl attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:30]];
    
    [priceTendencySegmentedControl addTarget:self action:@selector(priceTrendecySwitch:) forControlEvents:UIControlEventValueChanged];
    
    //--内容
    priceLineChart = [[KVNLineChartsView alloc] initWithFrame:CGRectMake(0, 50, appFrame.size.width, 200)];
    [priceTendencyView addSubview:priceLineChart];
    
    
    
    
    
    
    

    //置业顾问-------------------------------------------------------------------
    
    consultantView = [[UIView alloc] init];
    [self.view addSubview:consultantView];
    consultantView.backgroundColor = [UIColor purpleColor];
    consultantView.layer.borderWidth = 0.3;
    consultantView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    consultantView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:consultantView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:priceTendencyView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:consultantView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:priceTendencyView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:consultantView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:priceTendencyView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    _consultantViewConstraintHeight=[NSLayoutConstraint constraintWithItem:consultantView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:80*4+50];
    [self.view addConstraint:_consultantViewConstraintHeight];
    
    
    //标题栏
    UIView *consultantViewTitleBar = [[UIView alloc] init];
    [consultantView addSubview:consultantViewTitleBar];
    consultantViewTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    consultantViewTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    consultantViewTitleBar.layer.borderWidth = 0.5;
    consultantViewTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    UILabel *consultantViewTitleBarText = [[UILabel alloc] init];
    [consultantViewTitleBar addSubview:consultantViewTitleBarText];
    consultantViewTitleBarText.text = @"置业顾问";
    consultantViewTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    consultantViewTitleBarText.font=[UIFont systemFontOfSize:18 ];
    [consultantViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:consultantViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [consultantViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:consultantViewTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *consultantViewTitleBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [consultantViewTitleBar addSubview:consultantViewTitleBarArrow];
    consultantViewTitleBarArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [consultantViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:consultantViewTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [consultantViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBarArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:consultantViewTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [consultantViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [consultantViewTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:consultantViewTitleBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
  
    //内容
    consultantTableView = [[UITableView alloc] init];
    [consultantView addSubview:consultantTableView];
    consultantTableView.translatesAutoresizingMaskIntoConstraints = NO;
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantTableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:consultantViewTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantTableView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantTableView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [consultantView addConstraint:[NSLayoutConstraint constraintWithItem:consultantTableView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    consultantTableView.delegate = self;
    consultantTableView.dataSource = self;
    consultantTableView.tag =KVN_TABLEVIEW_CONSULTANT;
    consultantTableView.allowsSelection = NO;
    
    
    
    
    
    //周边项目---------------------------------------------------------------------
    surroundProjectView = [[UIView alloc] init];
    [self.view addSubview:surroundProjectView];
    surroundProjectView.backgroundColor = [UIColor purpleColor];
    surroundProjectView.layer.borderWidth = 0.3;
    surroundProjectView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    surroundProjectView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:consultantView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_SURROUNDPROJECTVIEW]];
    
    
    //标题栏
    UIView *surroundProjectTitleBar = [[UIView alloc] init];
    [surroundProjectView addSubview:surroundProjectTitleBar];
    surroundProjectTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    surroundProjectTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    surroundProjectTitleBar.layer.borderWidth = 0.5;
    surroundProjectTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    surroundProjectTitleBarText = [[UILabel alloc] init];
    [surroundProjectTitleBar addSubview:surroundProjectTitleBarText];
    surroundProjectTitleBarText.text = @"周边项目(0)";
    surroundProjectTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    surroundProjectTitleBarText.font=[UIFont systemFontOfSize:18 ];
    [surroundProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:surroundProjectTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [surroundProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:surroundProjectTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *surroundProjectTitleBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [surroundProjectTitleBar addSubview:surroundProjectTitleBarArrow];
    surroundProjectTitleBarArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [surroundProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:surroundProjectTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [surroundProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBarArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:surroundProjectTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [surroundProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [surroundProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectTitleBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    
    //周边项目
    UICollectionViewFlowLayout *surroundProjectCollectionLayout = [[UICollectionViewFlowLayout alloc] init];
    
    //单元格大小
    surroundProjectCollectionLayout.itemSize =CGSizeMake(160, 130);
    
    //行间距
    //hotCityCollectionLayout.minimumLineSpacing = 10;
    
    
    //列间距
    //hotCityCollectionLayout.minimumInteritemSpacing =20;
    [surroundProjectCollectionLayout setSectionInset:UIEdgeInsetsMake(10, 20, 10, 20)];
    [surroundProjectCollectionLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
    
    surroundProjectCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) collectionViewLayout:surroundProjectCollectionLayout];
    surroundProjectCollectionView.tag = KVN_COLLECTION_VIEW_SURROUND_PROJECT;
    surroundProjectCollectionView.alwaysBounceHorizontal = YES;
    surroundProjectCollectionView.showsHorizontalScrollIndicator = NO;
    surroundProjectCollectionView.delegate = self;
    surroundProjectCollectionView.dataSource = self;
    // [hotCityCollectionView setScrollEnabled:YES];
    surroundProjectCollectionView.backgroundColor = [UIColor whiteColor];
    //注册cell
    [surroundProjectCollectionView registerClass:[KVNHouseGraphicsCollectionViewCell class] forCellWithReuseIdentifier:@"SURROUND_PROJECT_COLLECTION_CELL"];
    [surroundProjectView addSubview:surroundProjectCollectionView];
    
    
    surroundProjectCollectionView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectCollectionView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:surroundProjectTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectCollectionView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectCollectionView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    
    [surroundProjectView addConstraint:[NSLayoutConstraint constraintWithItem:surroundProjectCollectionView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    
    //同类项目---------------------------------------------------------------------
    similarProjectView = [[UIView alloc] init];
    [self.view addSubview:similarProjectView];
    similarProjectView.backgroundColor = [UIColor purpleColor];
    similarProjectView.layer.borderWidth = 0.3;
    similarProjectView.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
    
    similarProjectView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:surroundProjectView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:KVN_CONTENT_BOX_HEIGHT_SIMILARPROJECTVIEW]];
    
    
    //标题栏
    UIView *similarProjectTitleBar = [[UIView alloc] init];
    [similarProjectView addSubview:similarProjectTitleBar];
    similarProjectTitleBar.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
    similarProjectTitleBar.layer.borderColor =[[UIColor colorWithWhite:0.8 alpha:1] CGColor];
    similarProjectTitleBar.layer.borderWidth = 0.5;
    similarProjectTitleBar.translatesAutoresizingMaskIntoConstraints = NO;
    
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:similarProjectView attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBar attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:similarProjectView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBar attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:similarProjectView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:50]];
    
    similarProjectTitleBarText = [[UILabel alloc] init];
    [similarProjectTitleBar addSubview:similarProjectTitleBarText];
    similarProjectTitleBarText.text = @"同类项目(0)";
    similarProjectTitleBarText.translatesAutoresizingMaskIntoConstraints = NO;
    similarProjectTitleBarText.font=[UIFont systemFontOfSize:18 ];
    [similarProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBarText attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:similarProjectTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [similarProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBarText attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:similarProjectTitleBar attribute:NSLayoutAttributeLeft multiplier:1 constant:10]];
    
    UIImageView *similarProjectTitleBarArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gray_rightArrow"]];
    
    [similarProjectTitleBar addSubview:similarProjectTitleBarArrow];
    similarProjectTitleBarArrow.translatesAutoresizingMaskIntoConstraints = NO;
    [similarProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBarArrow attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:similarProjectTitleBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    [similarProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBarArrow attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:similarProjectTitleBar attribute:NSLayoutAttributeRight multiplier:1 constant:-15]];
    [similarProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBarArrow attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:15]];
    [similarProjectTitleBar addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectTitleBarArrow attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0 constant:10]];
    
    
    //同类项目
    UICollectionViewFlowLayout *similarProjectCollectionLayout = [[UICollectionViewFlowLayout alloc] init];
    
    //单元格大小
    similarProjectCollectionLayout.itemSize =CGSizeMake(160, 130);
    
    //行间距
    //hotCityCollectionLayout.minimumLineSpacing = 10;
    
    
    //列间距
    //hotCityCollectionLayout.minimumInteritemSpacing =20;
    [similarProjectCollectionLayout setSectionInset:UIEdgeInsetsMake(10, 20, 10, 20)];
    [similarProjectCollectionLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
    
    similarProjectCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) collectionViewLayout:similarProjectCollectionLayout];
    similarProjectCollectionView.tag = KVN_COLLECTION_VIEW_SIMILAR_PROJECT;
    similarProjectCollectionView.alwaysBounceHorizontal = YES;
    similarProjectCollectionView.showsHorizontalScrollIndicator = NO;
    similarProjectCollectionView.delegate = self;
    similarProjectCollectionView.dataSource = self;
    // [hotCityCollectionView setScrollEnabled:YES];
    similarProjectCollectionView.backgroundColor = [UIColor whiteColor];
    //注册cell
    [similarProjectCollectionView registerClass:[KVNHouseGraphicsCollectionViewCell class] forCellWithReuseIdentifier:@"SIMILAR_PROJECT_COLLECTION_CELL"];
    [similarProjectView addSubview:similarProjectCollectionView];
    
    
    similarProjectCollectionView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectCollectionView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:similarProjectTitleBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectCollectionView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:similarProjectView attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
    
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectCollectionView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:similarProjectView attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
    
    [similarProjectView addConstraint:[NSLayoutConstraint constraintWithItem:similarProjectCollectionView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:similarProjectView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
    
    
    _mainView.contentSize= CGSizeMake(0, 3000);

    
    [self getMediaData];
    [self doRequestData];
}

- (void)viewDidLayoutSubviews{
    [self resetContentSize];

}

- (void) initNavigationItem{

    myBackButton= [UIButton buttonWithType:UIButtonTypeSystem];
    [myBackButton setImage:[UIImage imageNamed:@"back_icon2"] forState:UIControlStateNormal];
    [myBackButton.titleLabel setFont:[UIFont systemFontOfSize:18]];
    myBackButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    myBackButton.frame = CGRectMake(0, 0, self.navigationController.navigationBar.frame.size.width-70, 22);
    myBackButton.imageView.contentMode = UIViewContentModeScaleAspectFit;

    [myBackButton addTarget:self action:@selector(handleBackButton:) forControlEvents:UIControlEventTouchUpInside];
    
    UIBarButtonItem *myBackBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:myBackButton];
    
    
    // 调整 leftBarButtonItem 在 iOS7 下面的位置
    if(([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0?20:0)){
        UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
        negativeSpacer.width = -15;
        self.navigationItem.leftBarButtonItems = @[negativeSpacer, myBackBarButtonItem];
    }else{
        [self.navigationItem setLeftBarButtonItem:myBackBarButtonItem];
    }
    
    
    //分享
    UIButton *shareBarButtonItemCustomView = [UIButton buttonWithType:UIButtonTypeSystem];
    shareBarButtonItemCustomView.frame = CGRectMake(0, 0, 20, 20);
    [shareBarButtonItemCustomView addTarget:self action:@selector(defaultAction:) forControlEvents:UIControlEventTouchUpInside];
    [shareBarButtonItemCustomView setImage:[UIImage imageNamed:@"share_icon"] forState:UIControlStateNormal];
    UIBarButtonItem * shareBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:shareBarButtonItemCustomView];
    //收藏
    UIButton *favorBarButtonItemCustomView = [UIButton buttonWithType:UIButtonTypeSystem];
    favorBarButtonItemCustomView.frame = CGRectMake(0, 0, 20, 20);
    [favorBarButtonItemCustomView addTarget:self action:@selector(defaultAction:) forControlEvents:UIControlEventTouchUpInside];
    [favorBarButtonItemCustomView setImage:[UIImage imageNamed:@"favor_icon1"] forState:UIControlStateNormal];
    UIBarButtonItem * favorBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:favorBarButtonItemCustomView];
    [self.navigationItem setRightBarButtonItems:@[shareBarButtonItem,favorBarButtonItem]];
    
    

}

- (void) doFavor{


}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

#pragma mark -  图集数据 /house/images.do
/**
 *{"totalSize":1,"currentSize":1,"totalPage":1,"currentPage":1,"data":{"floorPlanUrls":[],"renderingUrls":["http://183.60.177.195:8888/uploadFile/userMobile/Images/2014/11/20141129043954034.jpg"],"modelMapUrls":[],"formatFigureUrls":[],"trafficMapUrls":[],"realMapUrls":[],"openHousesUrls":[],"projectSiteUrls":[],"supportingMapUrls":[],"promotionalMaterialsUrls":[],"activityDiagramUrls":[],"videoUrls":[],"panorama360Urls":[],"videoDefaultImages":[]},"status":1,"message":"返回房子图集列表"}
 * floorPlanUrls;//平面图集
 * renderingUrls;//效果图集
 * modelMapUrls;//户型图集
 * formatFigureUrls;//业态图集
 * trafficMapUrls;//交通图集
 * realMapUrls;//实景图集
 * openHousesUrls;//样板房图集
 * projectSiteUrls;//项目现场图集
 * supportingMapUrls;//配套图集
 * promotionalMaterialsUrls;//推广物料图集
 * activityDiagramUrls;//活动图集
 * videoUrls;//视频集
 * panorama360Urls;//360全景图片集
 */
- (void)getMediaData{
    
    [ApplicationDelegate.httpRequestEngine postWithPath:@"/house/images.do" json:@{@"houseId":[NSNumber numberWithInteger:_houseId]} completionHandler:^(MKNetworkOperation *operation) {
        _mediaSet = [[operation responseJSON] valueForKey:@"data"];
        [self MediaDataCount];
        [bannerCollectionView reloadData];
        
    } errorHandler:^(NSError *error) {
        NSLog(@"ERROR:getMediaData:%@",error.localizedDescription);
    }];



}
- (void) MediaDataCount{
    //[_mediaSet objectForKey:@""] count];
    int cnt = 0;
    /*
   [_mediaSet enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
       if (![key isEqualToString: @"videoDefaultImages"]) {
           int tmpCnt = obj.count;
           cnt = cnt+ tmpCnt;
       }
   }];*/
    cnt += [[_mediaSet valueForKey:@"videoUrls"] count];
    cnt += [[_mediaSet valueForKey:@"realMapUrls"] count];
    cnt += [[_mediaSet valueForKey:@"floorPlanUrls"] count];
    cnt += [[_mediaSet valueForKey:@"modelMapUrls"] count];
    cnt += [[_mediaSet valueForKey:@"renderingUrls"] count];
    cnt += [[_mediaSet valueForKey:@"openHouseUrls"] count];
    cnt += [[_mediaSet valueForKey:@"trafficMapUrls"] count];
    cnt += [[_mediaSet valueForKey:@"panorama360Urls"] count];
    cnt += [[_mediaSet valueForKey:@"projectSiteUrls"] count];
    cnt += [[_mediaSet valueForKey:@"formatFigureUrls"] count];
    cnt += [[_mediaSet valueForKey:@"supportingMapUrls"] count];
    cnt += [[_mediaSet valueForKey:@"activityDiagramUrls"] count];
    cnt += [[_mediaSet valueForKey:@"promtionalMaterialsUrls"] count];

    bannerMediaAmtLabel.text = [NSString stringWithFormat:@"共%d张",cnt];
    bannerPagingControl.text = [NSString stringWithFormat:@"1/%d",cnt];
    _bannerMediaAmt = cnt;
}


#pragma mark-走势图初始数据



- (void)priceTrendecySwitch:(UISegmentedControl *) segCtrl{

    switch (segCtrl.selectedSegmentIndex) {
        case 0:
        {
            NSDictionary *dic  = [_priceTrendencyData valueForKey:@"one"];
            priceLineChart.firstItemArray = [dic valueForKey:@"region"];
            priceLineChart.secondItemArray = [dic valueForKey:@"house"];
            [priceLineChart redrawCharts];
            [priceLineChart setNeedsDisplay];
        }
            break;
        case 1:
        {
            NSDictionary *dic = [_priceTrendencyData valueForKey:@"two"];
            priceLineChart.firstItemArray = [dic valueForKey:@"region"];
            priceLineChart.secondItemArray = [dic valueForKey:@"house"];
            [priceLineChart redrawCharts];
            [priceLineChart setNeedsDisplay];
        }
            break;
            
        default:
            break;
    }

}

#pragma mark --楼盘参数下拉动画切换
- (void)housePropertiesDropDownBarTouch:(UITapGestureRecognizer*)sender{
        //TODO:somthing
        if(_ishousePropertiesViewExplanded){
            //如果是打开的，那么就收起
            [self.view layoutIfNeeded];
            [UIView animateWithDuration:ANIMATION_DURATION animations:^{
                for (NSLayoutConstraint *constraint in self.view.constraints) {
                    if(constraint.firstItem == housePropertiesView && constraint.firstAttribute == NSLayoutAttributeHeight){
                        constraint.constant = KVN_CONTENT_BOX_HEIGHT_HOUSEPROPERTIES_MIN;
                    }
                }
               
                housePropertiesDropDownBarArrow.transform = CGAffineTransformMakeRotation(90*M_PI/180);
                [self.view layoutIfNeeded];
            } completion:^(BOOL finished) {
                _ishousePropertiesViewExplanded = NO;
                [self resetContentSize];
            }];
        }else{
            //打开楼盘参数
            [self.view layoutIfNeeded];
            [UIView animateWithDuration:ANIMATION_DURATION animations:^{
                for (NSLayoutConstraint *constraint in self.view.constraints) {
                    if(constraint.firstItem == housePropertiesView && constraint.firstAttribute == NSLayoutAttributeHeight){
                        constraint.constant = KVN_CONTENT_BOX_HEIGHT_HOUSEPROPERTIES_MAX;
                    }
                }
            housePropertiesDropDownBarArrow.transform = CGAffineTransformMakeRotation(-90*M_PI/180);
            [self.view layoutIfNeeded];
            } completion:^(BOOL finished) {
                _ishousePropertiesViewExplanded = YES;
                [self resetContentSize];
            }];
        
        
        }
        
}



#pragma mark --项目简介下拉动画切换
- (void)projectIntroDropDownBarTouch:(UITapGestureRecognizer*)sender{
    
    //[projectIntroView addConstraint:[NSLayoutConstraint constraintWithItem:projectIntroContentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:projectIntroContentTextView2 attribute:NSLayoutAttributeBottom multiplier:1 constant:10]];
    
    
    if (sender.cancelsTouchesInView) {
        //TODO:somthing
        if(_isProjectIntroViewExplanded){
            //如果是打开的，那么就收起
            [self.view layoutIfNeeded];
            [UIView animateWithDuration:ANIMATION_DURATION animations:^{
                [projectIntroView removeConstraint:_projectIntroViewHeightConstraint1];
                [projectIntroView addConstraint:_projectIntroViewHeightConstraint2];
                projectIntroDropDownBarArrow.transform = CGAffineTransformMakeRotation(90*M_PI/180);
                [self.view layoutIfNeeded];
            } completion:^(BOOL finished) {
                _isProjectIntroViewExplanded = NO;
                [self resetContentSize];
            }];
        }else{
            //打开楼盘参数
            [self.view layoutIfNeeded];
            [UIView animateWithDuration:ANIMATION_DURATION animations:^{
                [projectIntroView removeConstraint:_projectIntroViewHeightConstraint2];
                [projectIntroView addConstraint:_projectIntroViewHeightConstraint1];
                projectIntroDropDownBarArrow.transform = CGAffineTransformMakeRotation(-90*M_PI/180);
                [self.view layoutIfNeeded];
            } completion:^(BOOL finished) {
                _isProjectIntroViewExplanded = YES;
                [self resetContentSize];
            }];
            
            
        }
        
        
    }else{
        
    }
}


#pragma mark - collectionView的代理方法

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    
    if(collectionView.tag == KVN_COLLECTION_VIEW_MODEL){
        KVNHouseGraphicsCollectionViewCell *cell
        = [collectionView dequeueReusableCellWithReuseIdentifier:@"HOUSE_MODEL_GRAPHICS_COLLECTION_CELL" forIndexPath:indexPath];
        
        [cell.houseImageView setImageFromURL:[NSURL URLWithString:[[_modelList objectAtIndex:indexPath.item] valueForKey:@"modelImageUrl"]]];
        
        cell.valueLabel1.text = [[_modelList objectAtIndex:indexPath.item] valueForKey:@"modelName"];
        cell.valueLabel1.font = [UIFont systemFontOfSize:14];
        cell.valueLabel2.text = [NSString stringWithFormat:@"%@M2",[[_modelList objectAtIndex:indexPath.item] valueForKey:@"area"]];
        cell.valueLabel2.font = [UIFont systemFontOfSize:12];
        cell.valueLabel2.textColor = [UIColor grayColor];
        return cell;
    }
    
    
    if(collectionView.tag == KVN_COLLECTION_VIEW_SURROUND_PROJECT){
        KVNHouseGraphicsCollectionViewCell *cell
        = [collectionView dequeueReusableCellWithReuseIdentifier:@"SURROUND_PROJECT_COLLECTION_CELL" forIndexPath:indexPath];
    
        [cell.houseImageView setImageFromURL:[NSURL URLWithString:[[_surroundingsList objectAtIndex:indexPath.item] valueForKey:@"defaultImage"]] placeHolderImage:[UIImage imageNamed:@"cell_loading"]];
        
        cell.valueLabel1.text = [[_surroundingsList objectAtIndex:indexPath.item] valueForKey:@"houseName"];
        cell.valueLabel1.font = [UIFont systemFontOfSize:14];
        cell.valueLabel2.text = [NSString stringWithFormat:@"%@元/M2",[[_surroundingsList objectAtIndex:indexPath.item] valueForKey:@"price"]];
        cell.valueLabel2.font = [UIFont systemFontOfSize:12];
        cell.valueLabel2.textColor = [UIColor grayColor];
        return cell;
    }
    
    
    if(collectionView.tag == KVN_COLLECTION_VIEW_SIMILAR_PROJECT){
        KVNHouseGraphicsCollectionViewCell *cell
        = [collectionView dequeueReusableCellWithReuseIdentifier:@"SIMILAR_PROJECT_COLLECTION_CELL" forIndexPath:indexPath];
        [cell.houseImageView setImageFromURL:[NSURL URLWithString:[[_similarsList objectAtIndex:indexPath.item] valueForKey:@"defaultImage"]] placeHolderImage:[UIImage imageNamed:@"cell_loading"]];
        
        cell.valueLabel1.text = [[_similarsList objectAtIndex:indexPath.item] valueForKey:@"houseName"];
        cell.valueLabel1.font = [UIFont systemFontOfSize:14];
        cell.valueLabel2.text = [NSString stringWithFormat:@"%@元/M2",[[_similarsList objectAtIndex:indexPath.item] valueForKey:@"price"]];
        cell.valueLabel2.font = [UIFont systemFontOfSize:12];
        cell.valueLabel2.textColor = [UIColor grayColor];
        return cell;
    }
    
    
    if(collectionView.tag == KVN_COLLECTION_VIEW_BANNER_VIEW){
        KVNBannerCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"KVN_BANNER_MEDIA_CELL" forIndexPath:indexPath];
        
        NSString *imageUrlString ;
        
        switch (indexPath.section) {
            case MEDIA_VIDEO_URLS:
                imageUrlString =[[_mediaSet valueForKey:@"videoUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_REAL_MAP_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"realMapUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_FLOOR_PLANURLS:
                imageUrlString = [[_mediaSet valueForKey:@"floorPlanUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_MODEL_MAP_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"modelMapUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_RENDERING_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"renderingUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_OPEN_HOUSE_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"openHouseUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_TRAFFIC_MAP_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"trafficMapUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_PANORAMA_360_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"panorama360Urls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_PROJECT_SITE_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"projectSiteUrls"] objectAtIndex:indexPath.item];
                break;
                
            case MEDIA_FORMAT_FIGURE_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"formatFigureUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_SUPPORTING_MAP_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"supportingMapUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_ACTIVITY_DIAGRAM_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"activityDiagramUrls"] objectAtIndex:indexPath.item];
                break;
            case MEDIA_PROMOTIONAL_MATERIALS_URLS:
                imageUrlString = [[_mediaSet valueForKey:@"promtionalMaterialsUrls"] objectAtIndex:indexPath.item];
                break;
            default:
                imageUrlString = nil;
                break;
        }

        cell.backgroundColor = [UIColor greenColor];
        [cell.imageView setImageFromURL:[NSURL URLWithString:imageUrlString]];
        return cell;
    }
    
    return nil;
    
}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    if (collectionView.tag == KVN_COLLECTION_VIEW_BANNER_VIEW){

        switch (section) {
            case MEDIA_VIDEO_URLS:
                return [[_mediaSet valueForKey:@"videoUrls"] count];
                break;
            case MEDIA_REAL_MAP_URLS:
                return [[_mediaSet valueForKey:@"realMapUrls"] count];
                break;
            case MEDIA_FLOOR_PLANURLS:
                return [[_mediaSet valueForKey:@"floorPlanUrls"] count];
                break;
            case MEDIA_MODEL_MAP_URLS:
                return [[_mediaSet valueForKey:@"modelMapUrls"] count];
                break;
            case MEDIA_RENDERING_URLS:
                return [[_mediaSet valueForKey:@"renderingUrls"] count];
                break;
            case MEDIA_OPEN_HOUSE_URLS:
                return [[_mediaSet valueForKey:@"openHouseUrls"] count];
                break;
            case MEDIA_TRAFFIC_MAP_URLS:
                return [[_mediaSet valueForKey:@"trafficMapUrls"] count];
                break;
            case MEDIA_PANORAMA_360_URLS:
                return [[_mediaSet valueForKey:@"panorama360Urls"] count];
                break;
            case MEDIA_PROJECT_SITE_URLS:
                return [[_mediaSet valueForKey:@"projectSiteUrls"] count];
                break;
                
            case MEDIA_FORMAT_FIGURE_URLS:
                return [[_mediaSet valueForKey:@"formatFigureUrls"] count];
                break;
            case MEDIA_SUPPORTING_MAP_URLS:
                return [[_mediaSet valueForKey:@"supportingMapUrls"] count];
                break;
            case MEDIA_ACTIVITY_DIAGRAM_URLS:
                return [[_mediaSet valueForKey:@"activityDiagramUrls"] count];
                break;
            case MEDIA_PROMOTIONAL_MATERIALS_URLS:
                return [[_mediaSet valueForKey:@"promtionalMaterialsUrls"] count];
                break;
            default:
                return 0;
                break;
        }
    
    
    }
    
    
    if (collectionView.tag == KVN_COLLECTION_VIEW_MODEL){
        return _modelList.count;
    }
    
    return 10;
}

- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
    if(collectionView.tag == KVN_COLLECTION_VIEW_BANNER_VIEW){
        return 13;
    }
    
    return 1;
};


- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
    
    if(collectionView.tag == KVN_COLLECTION_VIEW_BANNER_VIEW){
        KVNMediaViewerViewController *controller = [[KVNMediaViewerViewController alloc] init];
        controller.data = _mediaSet;
        UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init];
        self.navigationItem.backBarButtonItem = backItem;
        [backItem setTitle:@""];
        [self.navigationController pushViewController:controller animated:YES];
        
    }
    
}

#pragma mark - tableview代理方法
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    switch (tableView.tag) {
        case KVN_TABLEVIEW_COMMENT:
            return [_commentList count];
            break;
        case KVN_TABLEVIEW_CONSULTANT:
            return _consultantList.count;
            break;
        default:
            break;
    }
    
    return 0;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    
    if(tableView.tag == KVN_TABLEVIEW_COMMENT){
        KVNHouseCommentTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HOUSE_COMMENT_CELL"];
    
        if(cell == nil){
            cell = [[KVNHouseCommentTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"HOUSE_COMMENT_CELL"];
            cell.backgroundColor = [UIColor whiteColor];
            cell.commentStarView.startSize = 20;
            cell.avatarImageView.layer.borderColor=[[UIColor colorWithWhite:0.9 alpha:1] CGColor];
            cell.avatarImageView.layer.borderWidth=0.3;
            cell.layer.borderColor = [[UIColor colorWithWhite:0.9 alpha:1] CGColor];
            cell.layer.borderWidth = 0.5;
            
        }
        
        NSString *iconStr =[[_commentList objectAtIndex:indexPath.row] valueForKey:@"icon"];
        [cell.avatarImageView setImageFromURL:[NSURL URLWithString:iconStr] placeHolderImage:[UIImage imageNamed:@"account"]];
        cell.userNameLabel.text = [[_commentList objectAtIndex:indexPath.row] valueForKey:@"realName"];
       
        cell.commentStarView.showStar =  [[[_commentList objectAtIndex:indexPath.row] valueForKey:@"avgScore"] floatValue] * 20;
        cell.commentContentLabel.text = [[_commentList objectAtIndex:indexPath.row] valueForKey:@"description"];
        cell.commentTimeLabel.text = [KVNDateUtil getDateStringWithDate:[NSDate dateWithTimeIntervalSince1970:[[[_commentList objectAtIndex:indexPath.row] valueForKey:@"addTime"] longLongValue]]  DateFormat:@"yyyy-MM-dd HH:mm:ss" ];
        
        return cell;
    }
    
    
    //置业顾问
    if(tableView.tag == KVN_TABLEVIEW_CONSULTANT){
        KVNConsultantTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"CONSULTANT_CELL"];
        
        if(cell == nil){
            cell = [[KVNConsultantTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CONSULTANT_CELL"];
        }
        
        [cell.avatarImageView setImageFromURL: [NSURL URLWithString: [[_consultantList objectAtIndex:indexPath.row] valueForKey:@"icon"]] placeHolderImage: [UIImage imageNamed:@"account"]];
        cell.userNameLabel.text = [[_consultantList objectAtIndex:indexPath.row] valueForKey:@"realName"];
        cell.commentStarView.showStar = [[[_consultantList objectAtIndex:indexPath.row] valueForKey:@"avgScore"] floatValue] * 20;
        cell.commentContentLabel.text = [NSString stringWithFormat:@"评价(%d)",[[[_consultantList objectAtIndex:indexPath.row] valueForKey:@"totalCommentQty"] intValue]];
        return cell;
    }
    

    return nil;
}

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

    //return [[tableView cellForRowAtIndexPath:indexPath].contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
    if(tableView.tag == KVN_TABLEVIEW_CONSULTANT){
        return KVN_CONSULTANT_TABLE_VIEW_CELL_HEIGHT;
    }else if(tableView.tag == KVN_TABLEVIEW_COMMENT){
        return 120;
    }else{
        return 0;
    }
    
    
}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView{

    if(scrollView.tag == KVN_COLLECTION_VIEW_BANNER_VIEW){
        _bannerMediaCurrentPage = (int)scrollView.contentOffset.x/scrollView.frame.size.width + 1;
        bannerPagingControl.text = [NSString stringWithFormat:@"%d/%d",_bannerMediaCurrentPage,_bannerMediaAmt];
        
    }
}


#pragma mark - 处理导航栏的返回按钮
- (void)handleBackButton:(id)sender{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)handleShareBarButtonItem:(id)sender{


}

- (void)handleFavorBarButtonItem:(id)sender{


}

#pragma mark -数据请求
-(void) doRequestData{
   

    if (_activityIndicatorView == nil) {
         _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
        [_activityIndicatorView setHidesWhenStopped:YES];
        [self.view addSubview:_activityIndicatorView];
        _activityIndicatorView.translatesAutoresizingMaskIntoConstraints = NO;
        [self.view addConstraint:[NSLayoutConstraint constraintWithItem:_activityIndicatorView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
        [self.view addConstraint:[NSLayoutConstraint constraintWithItem:_activityIndicatorView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    }

    [_activityIndicatorView setHidden:NO];
    [_activityIndicatorView startAnimating];
    
    
 
    
    

    //优惠列表 /house/preferential.do
    [ApplicationDelegate.httpRequestEngine postWithPath:@"/house/getPreferential.do" json: @{@"activityCategoryId":@1,@"houseId":[NSNumber numberWithInteger:_houseId]} completionHandler:^(MKNetworkOperation *operation) {
        [_activityIndicatorView stopAnimating];
        
        if([[[operation responseJSON] valueForKey:@"data"] count] >0){
            NSDictionary * data = [[[operation responseJSON] valueForKey:@"data"] objectAtIndex:0];
        
            saleCntValueLabel.text = [NSString stringWithFormat:@"%@套",[data valueForKey:@"houseSalableQty"]];
            promotionApplyAmountValue.text = [NSString stringWithFormat:@"%@人",[data valueForKey:@"count"]];
        
            promotionContentDetail.text = [NSString stringWithFormat:@"%@",[data valueForKey:@"content"]];
        
            NSDate *endDate = [NSDate dateWithTimeIntervalSince1970:[[NSString stringWithFormat:@"%@",[data valueForKey:@"content"]] longLongValue]];
        
            promotionEndTime.text = [KVNDateUtil getDateStringWithDate:endDate DateFormat:@"yyyy-MM-dd HH:mm:ss"];
        }else{
            for (NSLayoutConstraint *constraint in self.view.constraints) {
                if (constraint.firstItem == promotionView && constraint.firstAttribute == NSLayoutAttributeHeight) {
                    constraint.constant = 0;
                
                }
            }
            
          
           //[promotionView setHidden:YES];
        }
        
    } errorHandler:^(NSError *error) {
        NSLog(@"ERROR:/house/preferential.do:%@",error.localizedDescription);
    }];

    
    //楼盘参数/house/houseDetail.do
    [ApplicationDelegate.httpRequestEngine postWithPath:@"/house/houseDetail.do" json:@{@"activityCategoryId":@1,@"houseId":[NSNumber numberWithInteger:_houseId]} completionHandler:^(MKNetworkOperation *operation) {
        
        NSDictionary *houseDetailData =[[operation responseJSON] valueForKey:@"data"];
        NSDictionary * houseData = [ houseDetailData valueForKey:@"house"];
        NSDictionary * developerData = [houseDetailData valueForKey:@"houseDeveloper"];
        NSArray *modelList = [houseDetailData valueForKey:@"modelList"];
        
        //标题
        [myBackButton setTitle:[houseData valueForKey:@"houseName"] forState:UIControlStateNormal];
        //摘要
        
        priceValueLabel.text = [NSString stringWithFormat:@"%@元/平",[houseData valueForKey:@"price"]];
        openDateValueLabel.text = [KVNDateUtil getDateStringWithDate:[NSDate dateWithTimeIntervalSince1970:[[houseData valueForKey:@"openedTime"] longLongValue]] DateFormat:@"yyyy-MM-dd"];
        addressValueLabel.text = [houseData valueForKey:@"address"];
        
        
        
        //开业时间openingTime
        housePropertiesOpenDateValue.text =[KVNDateUtil getDateStringWithDate:[NSDate dateWithTimeIntervalSince1970:[[houseData valueForKey:@"openingTime"] longLongValue]] DateFormat:@"yyyy-MM-dd"];
        ;
        //规划业态planFormat
        housePropertiesPlanIndustValue.text = [houseData valueForKey:@"planFormat"];
        //建筑类型buidingType
        housePropertiesBuildTypeValue.text = [houseData valueForKey:@"buildingType"];
        //规划类型 planType
        housePropertiesPlanTypeValue.text = @"暂无";
        //建筑面积 buildingArea
        housePropertiesBuildAreaValue.text = [NSString stringWithFormat:@"%@万平方米",[houseData valueForKey:@"buildingArea"]];
        //公摊率 publicRoundRate
        housePropertiesShareRatioValue.text = [houseData valueForKey:@"publicRoundRate"];
        //容积率 volumeRate
        housePropertiesPlotRatioValue.text = [houseData valueForKey:@"volumeRate"];
        //绿化率 greeningRate
        housePropertiesGreenRatioValue.text = [houseData valueForKey:@"greeningRate"];
        //地下车位数 undergroundParkingSpaces
        housePropertiesParkingPlaceAmountValue2.text = [houseData valueForKey:@"undergroundParkingSpaces"];
        //地上车位数 groundParkingSpaces
        housePropertiesParkingPlaceAmountValue1.text = [houseData valueForKey:@"groundParkingSpaces"];
        //物业数量 properties
        housePropertiesBuildingAmountValue.text = [NSString stringWithFormat:@"%@套",[houseData valueForKey:@"properties"]];
        //开发商
        housePropertiesDevelaperValue.text = [developerData valueForKey:@"developersName"];
        //运营管理公司 operationsManagement
        housePropertiesManagementCompanyValue.text = [houseData valueForKey:@"operationsManagement"];
        //产权年限 propertyAge
        housePropertiesYearOfPropertyRightValue.text = [NSString stringWithFormat:@"%@年",[houseData valueForKey:@"propertyAge"]];
        //开工时间 buildingStartTime
        housePropertiesStartDateValue.text = [KVNDateUtil getDateStringWithDate:[NSDate dateWithTimeIntervalSince1970:[[houseData valueForKey:@"buildingStartTime"] longLongValue]] DateFormat:@"yyyy-MM-dd"];
        //竣工时间 buildingEndTime
        housePropertiesEndDateValue.text = [KVNDateUtil getDateStringWithDate:[NSDate dateWithTimeIntervalSince1970:[[houseData valueForKey:@"buildingEndTime"] longLongValue]] DateFormat:@"yyyy-MM-dd"];
        
        
        
        //----------------------户型图
        _modelList = modelList;
        houseModelGraphicViewTitleBarText.text = [NSString stringWithFormat:@"户型图(%lu)",(unsigned long)[_modelList count]];
        [modelGraphicsCollectionView reloadData];
        
        //-------------------地图找房 longitude latitude regionName
        findHouseInMapAddressValue.text = [houseData valueForKey:@"regionName"];
        NSString *mapPicUrl = [NSString stringWithFormat:@"http://api.map.baidu.com/staticimage?center=%@,%@&width=%f&height=200&zoom=11",
                               [houseData valueForKey:@"longitude"],
                               [houseData valueForKey:@"latitude"],
                              [[UIScreen mainScreen] applicationFrame].size.width];

        [findHouseInMapStaticImageView setImageFromURL:[NSURL URLWithString:mapPicUrl]];
        
        //--------------------动态
        NSArray *dynamicList = [houseDetailData valueForKey:@"dynamicList"];
        dynamicViewTitleBarText.text = [NSString stringWithFormat:@"动态(%lu)",(unsigned long)dynamicList.count];
        if(dynamicList.count>0){
            dynamicContentTitle.text= @"";
            dynamicContentDate.text = @"";
        }
        
        //--------------------项目简介
        projectIntroContentTextView1.text = [houseData valueForKey:@"houseDescription"];
        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
        [paragraphStyle setFirstLineHeadIndent:20];
        NSMutableAttributedString *projectIntroContentTextView1AttrStr = [[NSMutableAttributedString alloc] initWithString:projectIntroContentTextView1.text];
        [projectIntroContentTextView1AttrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,  projectIntroContentTextView1.text.length)];
        projectIntroContentTextView1.attributedText =projectIntroContentTextView1AttrStr;
        
        
        projectIntroContentTextView2.text =[developerData valueForKey:@"developersDescription"];
        NSMutableAttributedString *projectIntroContentTextView2AttrStr = [[NSMutableAttributedString alloc] initWithString:projectIntroContentTextView2.text];
        [projectIntroContentTextView2AttrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,  projectIntroContentTextView2.text.length)];
        projectIntroContentTextView2.attributedText =projectIntroContentTextView2AttrStr;
        
        
        
        //----------------在线评房
        NSDictionary *houseCommentData = [houseDetailData valueForKey:@"houseCommentDTO"];
        _commentList = [houseCommentData valueForKey:@"commentList"];
        [commentTableView reloadData];
        commentTableHeaderViewTotalScoreLabel.text = [NSString stringWithFormat:@"%.1f分",[[houseCommentData valueForKey:@"avgScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"avgScore"] floatValue]];
        commentTableHeaderStarView.showStar = [[houseCommentData valueForKey:@"avgScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"avgScore"] floatValue] * 20;
        [commentTableHeaderStarView setNeedsDisplay];
        commentTableHeaderViewDetailScoreLabel.text = [NSString stringWithFormat:@"价格%.1f分 地段%.1f分 配套%.1f分 交通%.1f分 环境%.1f分",
                                                       [[houseCommentData valueForKey:@"priceScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"priceScore"] floatValue],
                                                       [[houseCommentData valueForKey:@"areaScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"areaScore"] floatValue],
                                                       [[houseCommentData valueForKey:@"supportingScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"supportingScore"] floatValue],
                                                       [[houseCommentData valueForKey:@"trafficScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"trafficScore"] floatValue],
                                                       [[houseCommentData valueForKey:@"milieuScore"] isEqual:[NSNull null]]?0.0:[[houseCommentData valueForKey:@"milieuScore"] floatValue]];
        
        
        //------------------房价走势
        
        
        //------------------置业顾问consultantList
        _consultantList = [houseDetailData valueForKey:@"consultantList"];
        if([_consultantList isEqual:[NSNull null]]){
            _consultantList = nil;
        }

        [consultantTableView reloadData];
        long consultantCount =_consultantList.count;
        if (consultantCount >4) {
            _consultantViewConstraintHeight.constant = KVN_CONSULTANT_TABLE_VIEW_CELL_HEIGHT * 4.0 + 50;
        }else{
            _consultantViewConstraintHeight.constant = KVN_CONSULTANT_TABLE_VIEW_CELL_HEIGHT * consultantCount + 50;
        }
        
        
        //------------周边项目
        _surroundingsList = [houseDetailData valueForKey:@"surroundingsList"];
        surroundProjectTitleBarText.text = [NSString stringWithFormat:@"周边项目(%lu)",(unsigned long)[_surroundingsList count]];
        [surroundProjectCollectionView reloadData];
        
        //------------同类项目
        _similarsList = [houseDetailData valueForKey:@"similarsList"];
        similarProjectTitleBarText.text =[NSString stringWithFormat:@"同类项目(%lu)",(unsigned long)[_similarsList count]];
        [similarProjectCollectionView reloadData];

        
        //走势图
        _priceTrendencyData =[houseDetailData valueForKey:@"priceMap"];
        NSDictionary *dic = [_priceTrendencyData valueForKey:@"one"];
        priceLineChart.firstItemArray = [dic valueForKey:@"region"];
        priceLineChart.secondItemArray = [dic valueForKey:@"house"];
        priceLineChart.firstItemName =[houseData valueForKey:@"regionName"];
        priceLineChart.secondItemName = [houseData valueForKey:@"houseName"];
        [priceLineChart redrawCharts];
        [priceLineChart setNeedsDisplay];
        [self resetContentSize];
        [priceTendencySegmentedControl setSelectedSegmentIndex:0];
        
        
    } errorHandler:^(NSError *error) {
        [_activityIndicatorView stopAnimating];
        NSLog(@"ERROR:楼盘参数/house/houseDetail.do:%@",error.localizedDescription);
    }];
    
    

}


- (void) resetContentSize{

    CGFloat height = _bannerView.bounds.size.height
                +summaryView.bounds.size.height
                +promotionView.bounds.size.height
                +scenesTourView.bounds.size.height
                +houseModelGraphicView.bounds.size.height
                +findHouseInMapView.bounds.size.height
                +dynamicView.bounds.size.height
                +commentView.bounds.size.height
                +priceTendencyView.bounds.size.height
                +consultantView.bounds.size.height
                +surroundProjectView.bounds.size.height
                +similarProjectView.bounds.size.height
                +housePropertiesView.bounds.size.height
                +projectIntroView.bounds.size.height
                - 50;
    _mainView.contentSize= CGSizeMake(0, height);

}

#pragma mark --默认动作
- (void)defaultAction:(id)sender{

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Sorroy!" message:@"此功能尚未开发" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];

}





@end
